objc2_authentication_services/generated/
ASPasskeyCredentialRequestParameters.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    /// A class that holds various parameters related to a passkey credential request.
11    /// This class is provided by the system to the credential provider extension when there is an active passkey request as part of
12    /// -[ASCredentialProviderViewController prepareCredentialListForServiceIdentifiers:requestParameters:] and should be used
13    /// to construct a passkey credential response using the item selected by the user from the extension's UI.
14    ///
15    /// See also [Apple's documentation](https://developer.apple.com/documentation/authenticationservices/aspasskeycredentialrequestparameters?language=objc)
16    #[unsafe(super(NSObject))]
17    #[derive(Debug, PartialEq, Eq, Hash)]
18    pub struct ASPasskeyCredentialRequestParameters;
19);
20
21unsafe impl Send for ASPasskeyCredentialRequestParameters {}
22
23unsafe impl Sync for ASPasskeyCredentialRequestParameters {}
24
25extern_conformance!(
26    unsafe impl NSCoding for ASPasskeyCredentialRequestParameters {}
27);
28
29extern_conformance!(
30    unsafe impl NSCopying for ASPasskeyCredentialRequestParameters {}
31);
32
33unsafe impl CopyingHelper for ASPasskeyCredentialRequestParameters {
34    type Result = Self;
35}
36
37extern_conformance!(
38    unsafe impl NSObjectProtocol for ASPasskeyCredentialRequestParameters {}
39);
40
41extern_conformance!(
42    unsafe impl NSSecureCoding for ASPasskeyCredentialRequestParameters {}
43);
44
45impl ASPasskeyCredentialRequestParameters {
46    extern_methods!(
47        #[unsafe(method(init))]
48        #[unsafe(method_family = init)]
49        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
50
51        /// The relying party identifier for this request.
52        ///
53        /// This property is not atomic.
54        ///
55        /// # Safety
56        ///
57        /// This might not be thread-safe.
58        #[unsafe(method(relyingPartyIdentifier))]
59        #[unsafe(method_family = none)]
60        pub unsafe fn relyingPartyIdentifier(&self) -> Retained<NSString>;
61
62        /// Hash of client data for credential provider to sign as part of the operation.
63        ///
64        /// This property is not atomic.
65        ///
66        /// # Safety
67        ///
68        /// This might not be thread-safe.
69        #[unsafe(method(clientDataHash))]
70        #[unsafe(method_family = none)]
71        pub unsafe fn clientDataHash(&self) -> Retained<NSData>;
72
73        #[cfg(feature = "ASAuthorizationPublicKeyCredentialConstants")]
74        /// A preference for whether the authenticator should attempt to verify that it is being used by its owner, such as through a PIN or biometrics.
75        ///
76        /// This property is not atomic.
77        ///
78        /// # Safety
79        ///
80        /// This might not be thread-safe.
81        #[unsafe(method(userVerificationPreference))]
82        #[unsafe(method_family = none)]
83        pub unsafe fn userVerificationPreference(
84            &self,
85        ) -> Retained<ASAuthorizationPublicKeyCredentialUserVerificationPreference>;
86
87        /// A list of allowed credential IDs for this request. An empty list means all credentials are allowed.
88        ///
89        /// This property is not atomic.
90        ///
91        /// # Safety
92        ///
93        /// This might not be thread-safe.
94        #[unsafe(method(allowedCredentials))]
95        #[unsafe(method_family = none)]
96        pub unsafe fn allowedCredentials(&self) -> Retained<NSArray<NSData>>;
97
98        #[cfg(feature = "ASPasskeyAssertionCredentialExtensionInput")]
99        /// Inputs for WebAuthn extensions used for passkey assertion.
100        ///
101        /// This property is not atomic.
102        ///
103        /// # Safety
104        ///
105        /// This might not be thread-safe.
106        #[unsafe(method(extensionInput))]
107        #[unsafe(method_family = none)]
108        pub unsafe fn extensionInput(
109            &self,
110        ) -> Option<Retained<ASPasskeyAssertionCredentialExtensionInput>>;
111    );
112}
113
114/// Methods declared on superclass `NSObject`.
115impl ASPasskeyCredentialRequestParameters {
116    extern_methods!(
117        #[unsafe(method(new))]
118        #[unsafe(method_family = new)]
119        pub unsafe fn new() -> Retained<Self>;
120    );
121}