objc2_authentication_services/generated/
ASAuthorizationPlatformPublicKeyCredentialProvider.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/asauthorizationplatformpublickeycredentialprovider?language=objc)
11    #[unsafe(super(NSObject))]
12    #[derive(Debug, PartialEq, Eq, Hash)]
13    pub struct ASAuthorizationPlatformPublicKeyCredentialProvider;
14);
15
16#[cfg(feature = "ASAuthorizationProvider")]
17extern_conformance!(
18    unsafe impl ASAuthorizationProvider for ASAuthorizationPlatformPublicKeyCredentialProvider {}
19);
20
21extern_conformance!(
22    unsafe impl NSObjectProtocol for ASAuthorizationPlatformPublicKeyCredentialProvider {}
23);
24
25impl ASAuthorizationPlatformPublicKeyCredentialProvider {
26    extern_methods!(
27        #[unsafe(method(initWithRelyingPartyIdentifier:))]
28        #[unsafe(method_family = init)]
29        pub unsafe fn initWithRelyingPartyIdentifier(
30            this: Allocated<Self>,
31            relying_party_identifier: &NSString,
32        ) -> Retained<Self>;
33
34        #[cfg(all(
35            feature = "ASAuthorizationPlatformPublicKeyCredentialRegistrationRequest",
36            feature = "ASAuthorizationRequest"
37        ))]
38        /// Create a request to register a new platform credential.
39        ///
40        /// Parameter `challenge`: The challenge to sign.
41        ///
42        /// Parameter `name`: The user name for the new credential.
43        ///
44        /// Parameter `userID`: An identifier to be stored alongside the credential, which will be returned with the credential when it is used to authenticate.
45        #[unsafe(method(createCredentialRegistrationRequestWithChallenge:name:userID:))]
46        #[unsafe(method_family = none)]
47        pub unsafe fn createCredentialRegistrationRequestWithChallenge_name_userID(
48            &self,
49            challenge: &NSData,
50            name: &NSString,
51            user_id: &NSData,
52        ) -> Retained<ASAuthorizationPlatformPublicKeyCredentialRegistrationRequest>;
53
54        #[cfg(all(
55            feature = "ASAuthorizationPlatformPublicKeyCredentialRegistrationRequest",
56            feature = "ASAuthorizationRequest"
57        ))]
58        /// Create a request to register a new platform credential.
59        ///
60        /// Parameter `challenge`: The challenge to sign.
61        ///
62        /// Parameter `name`: The user name for the new credential.
63        ///
64        /// Parameter `userID`: An identifier to be stored alongside the credential, which will be returned with the credential when it is used to authenticate.
65        ///
66        /// Parameter `requestStyle`: The style for this request.
67        #[unsafe(method(createCredentialRegistrationRequestWithChallenge:name:userID:requestStyle:))]
68        #[unsafe(method_family = none)]
69        pub unsafe fn createCredentialRegistrationRequestWithChallenge_name_userID_requestStyle(
70            &self,
71            challenge: &NSData,
72            name: &NSString,
73            user_id: &NSData,
74            request_style: ASAuthorizationPlatformPublicKeyCredentialRegistrationRequestStyle,
75        ) -> Retained<ASAuthorizationPlatformPublicKeyCredentialRegistrationRequest>;
76
77        #[cfg(all(
78            feature = "ASAuthorizationPlatformPublicKeyCredentialAssertionRequest",
79            feature = "ASAuthorizationRequest"
80        ))]
81        /// Create a request to authenticate using an existing credential.
82        ///
83        /// Parameter `challenge`: The challenge to sign.
84        #[unsafe(method(createCredentialAssertionRequestWithChallenge:))]
85        #[unsafe(method_family = none)]
86        pub unsafe fn createCredentialAssertionRequestWithChallenge(
87            &self,
88            challenge: &NSData,
89        ) -> Retained<ASAuthorizationPlatformPublicKeyCredentialAssertionRequest>;
90
91        /// The Relying Party identifier used for all requests created by this object.
92        #[unsafe(method(relyingPartyIdentifier))]
93        #[unsafe(method_family = none)]
94        pub unsafe fn relyingPartyIdentifier(&self) -> Retained<NSString>;
95
96        #[unsafe(method(new))]
97        #[unsafe(method_family = new)]
98        pub unsafe fn new() -> Retained<Self>;
99
100        #[unsafe(method(init))]
101        #[unsafe(method_family = init)]
102        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
103    );
104}
105
106impl ASAuthorizationPlatformPublicKeyCredentialProvider {
107    extern_methods!();
108}
109
110#[cfg(feature = "ASAuthorizationWebBrowserPlatformPublicKeyCredentialProvider")]
111extern_conformance!(
112    unsafe impl ASAuthorizationWebBrowserPlatformPublicKeyCredentialProvider
113        for ASAuthorizationPlatformPublicKeyCredentialProvider
114    {
115    }
116);