objc2_authentication_services/generated/
ASAuthorizationSingleSignOnCredential.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ptr::NonNull;
4use objc2::__framework_prelude::*;
5use objc2_foundation::*;
6
7use crate::*;
8
9extern_class!(
10    /// [Apple's documentation](https://developer.apple.com/documentation/authenticationservices/asauthorizationsinglesignoncredential?language=objc)
11    #[unsafe(super(NSObject))]
12    #[derive(Debug, PartialEq, Eq, Hash)]
13    pub struct ASAuthorizationSingleSignOnCredential;
14);
15
16#[cfg(feature = "ASAuthorizationCredential")]
17extern_conformance!(
18    unsafe impl ASAuthorizationCredential for ASAuthorizationSingleSignOnCredential {}
19);
20
21extern_conformance!(
22    unsafe impl NSCoding for ASAuthorizationSingleSignOnCredential {}
23);
24
25extern_conformance!(
26    unsafe impl NSCopying for ASAuthorizationSingleSignOnCredential {}
27);
28
29unsafe impl CopyingHelper for ASAuthorizationSingleSignOnCredential {
30    type Result = Self;
31}
32
33extern_conformance!(
34    unsafe impl NSObjectProtocol for ASAuthorizationSingleSignOnCredential {}
35);
36
37extern_conformance!(
38    unsafe impl NSSecureCoding for ASAuthorizationSingleSignOnCredential {}
39);
40
41impl ASAuthorizationSingleSignOnCredential {
42    extern_methods!(
43        /// A state returned from the AuthenticationServices extension.
44        #[unsafe(method(state))]
45        #[unsafe(method_family = none)]
46        pub unsafe fn state(&self) -> Option<Retained<NSString>>;
47
48        /// An access token used to access other systems with the authorized scopes.
49        #[unsafe(method(accessToken))]
50        #[unsafe(method_family = none)]
51        pub unsafe fn accessToken(&self) -> Option<Retained<NSData>>;
52
53        /// A JSON Web Token (JWT) used to communicate information about the identity of the user in a secure way to the app.
54        #[unsafe(method(identityToken))]
55        #[unsafe(method_family = none)]
56        pub unsafe fn identityToken(&self) -> Option<Retained<NSData>>;
57
58        #[cfg(feature = "ASAuthorization")]
59        /// This value will contain a list of scopes for which the user provided authorization.  These may contain a subset of the requested scopes on
60        ///
61        /// See: ASAuthorizationOpenIDRequest.  The application should query this value to identify which scopes were returned as it maybe different from ones requested.
62        #[unsafe(method(authorizedScopes))]
63        #[unsafe(method_family = none)]
64        pub unsafe fn authorizedScopes(&self) -> Retained<NSArray<ASAuthorizationScope>>;
65
66        /// The complete AuthenticationServices extension response with the additional outputs used by the specific technology used by the Authorization Server instance and AuthenticationServices Extension.
67        ///
68        /// Note: for some operations all properties can be null and the response will indicate just successful result of the operation.
69        #[unsafe(method(authenticatedResponse))]
70        #[unsafe(method_family = none)]
71        pub unsafe fn authenticatedResponse(&self) -> Option<Retained<NSHTTPURLResponse>>;
72
73        /// Private SecKeys returned from the AuthenticationServices extension.
74        #[unsafe(method(privateKeys))]
75        #[unsafe(method_family = none)]
76        pub unsafe fn privateKeys(&self) -> Retained<NSArray>;
77
78        #[unsafe(method(new))]
79        #[unsafe(method_family = new)]
80        pub unsafe fn new() -> Retained<Self>;
81
82        #[unsafe(method(init))]
83        #[unsafe(method_family = init)]
84        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
85    );
86}