objc2_authentication_services/generated/
ASPasskeyRegistrationCredential.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use core::ffi::*;
4use core::ptr::NonNull;
5use objc2::__framework_prelude::*;
6use objc2_foundation::*;
7
8use crate::*;
9
10extern_class!(
11    /// [Apple's documentation](https://developer.apple.com/documentation/authenticationservices/aspasskeyregistrationcredential?language=objc)
12    #[unsafe(super(NSObject))]
13    #[derive(Debug, PartialEq, Eq, Hash)]
14    pub struct ASPasskeyRegistrationCredential;
15);
16
17#[cfg(feature = "ASAuthorizationCredential")]
18extern_conformance!(
19    unsafe impl ASAuthorizationCredential for ASPasskeyRegistrationCredential {}
20);
21
22extern_conformance!(
23    unsafe impl NSCoding for ASPasskeyRegistrationCredential {}
24);
25
26extern_conformance!(
27    unsafe impl NSCopying for ASPasskeyRegistrationCredential {}
28);
29
30unsafe impl CopyingHelper for ASPasskeyRegistrationCredential {
31    type Result = Self;
32}
33
34extern_conformance!(
35    unsafe impl NSObjectProtocol for ASPasskeyRegistrationCredential {}
36);
37
38extern_conformance!(
39    unsafe impl NSSecureCoding for ASPasskeyRegistrationCredential {}
40);
41
42impl ASPasskeyRegistrationCredential {
43    extern_methods!(
44        /// Initializes an ASPasskeyRegistrationCredential object.
45        ///
46        /// Parameter `relyingParty`: The relying party identifier associated with this passkey.
47        ///
48        /// Parameter `clientDataHash`: The JSON encoded client data for this registration result.
49        ///
50        /// Parameter `credentialID`: The unique identifier for this passkey.
51        ///
52        /// Parameter `attestationObject`: The attestation object for this passkey registration result.
53        #[unsafe(method(initWithRelyingParty:clientDataHash:credentialID:attestationObject:))]
54        #[unsafe(method_family = init)]
55        pub unsafe fn initWithRelyingParty_clientDataHash_credentialID_attestationObject(
56            this: Allocated<Self>,
57            relying_party: &NSString,
58            client_data_hash: &NSData,
59            credential_id: &NSData,
60            attestation_object: &NSData,
61        ) -> Retained<Self>;
62
63        #[cfg(feature = "ASPasskeyRegistrationCredentialExtensionOutput")]
64        /// Initializes an ASPasskeyRegistrationCredential object.
65        ///
66        /// Parameter `relyingParty`: The relying party identifier associated with this passkey.
67        ///
68        /// Parameter `clientDataHash`: The JSON encoded client data for this registration result.
69        ///
70        /// Parameter `credentialID`: The unique identifier for this passkey.
71        ///
72        /// Parameter `attestationObject`: The attestation object for this passkey registration result.
73        ///
74        /// Parameter `extensionOutput`: The output of WebAuthn extensions processed by the credential provider.
75        #[unsafe(method(initWithRelyingParty:clientDataHash:credentialID:attestationObject:extensionOutput:))]
76        #[unsafe(method_family = init)]
77        pub unsafe fn initWithRelyingParty_clientDataHash_credentialID_attestationObject_extensionOutput(
78            this: Allocated<Self>,
79            relying_party: &NSString,
80            client_data_hash: &NSData,
81            credential_id: &NSData,
82            attestation_object: &NSData,
83            extension_output: Option<&ASPasskeyRegistrationCredentialExtensionOutput>,
84        ) -> Retained<Self>;
85
86        /// Creates and initializes an ASPasskeyRegistrationCredential object.
87        ///
88        /// Parameter `relyingParty`: The relying party identifier associated with this passkey.
89        ///
90        /// Parameter `clientDataHash`: The JSON encoded client data for this registration result.
91        ///
92        /// Parameter `credentialID`: The unique identifier for this passkey.
93        ///
94        /// Parameter `attestationObject`: The attestation object for this passkey registration result.
95        #[unsafe(method(credentialWithRelyingParty:clientDataHash:credentialID:attestationObject:))]
96        #[unsafe(method_family = none)]
97        pub unsafe fn credentialWithRelyingParty_clientDataHash_credentialID_attestationObject(
98            relying_party: &NSString,
99            client_data_hash: &NSData,
100            credential_id: &NSData,
101            attestation_object: &NSData,
102        ) -> Retained<Self>;
103
104        /// The relying party identifier associated with this passkey.
105        #[unsafe(method(relyingParty))]
106        #[unsafe(method_family = none)]
107        pub unsafe fn relyingParty(&self) -> Retained<NSString>;
108
109        /// The hash of the client data for this registration result.
110        #[unsafe(method(clientDataHash))]
111        #[unsafe(method_family = none)]
112        pub unsafe fn clientDataHash(&self) -> Retained<NSData>;
113
114        /// The raw credential identifier of this passkey.
115        #[unsafe(method(credentialID))]
116        #[unsafe(method_family = none)]
117        pub unsafe fn credentialID(&self) -> Retained<NSData>;
118
119        /// The attestation object for this passkey registration result.
120        #[unsafe(method(attestationObject))]
121        #[unsafe(method_family = none)]
122        pub unsafe fn attestationObject(&self) -> Retained<NSData>;
123
124        #[cfg(feature = "ASPasskeyRegistrationCredentialExtensionOutput")]
125        /// The outputs for WebAuthn extensions processed by the credential provider.
126        #[unsafe(method(extensionOutput))]
127        #[unsafe(method_family = none)]
128        pub unsafe fn extensionOutput(
129            &self,
130        ) -> Option<Retained<ASPasskeyRegistrationCredentialExtensionOutput>>;
131
132        #[cfg(feature = "ASPasskeyRegistrationCredentialExtensionOutput")]
133        /// Setter for [`extensionOutput`][Self::extensionOutput].
134        #[unsafe(method(setExtensionOutput:))]
135        #[unsafe(method_family = none)]
136        pub unsafe fn setExtensionOutput(
137            &self,
138            extension_output: Option<&ASPasskeyRegistrationCredentialExtensionOutput>,
139        );
140    );
141}
142
143/// Methods declared on superclass `NSObject`.
144impl ASPasskeyRegistrationCredential {
145    extern_methods!(
146        #[unsafe(method(init))]
147        #[unsafe(method_family = init)]
148        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
149
150        #[unsafe(method(new))]
151        #[unsafe(method_family = new)]
152        pub unsafe fn new() -> Retained<Self>;
153    );
154}