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        #[unsafe(method(relyingPartyIdentifier))]
53        #[unsafe(method_family = none)]
54        pub unsafe fn relyingPartyIdentifier(&self) -> Retained<NSString>;
55
56        /// Hash of client data for credential provider to sign as part of the operation.
57        #[unsafe(method(clientDataHash))]
58        #[unsafe(method_family = none)]
59        pub unsafe fn clientDataHash(&self) -> Retained<NSData>;
60
61        #[cfg(feature = "ASAuthorizationPublicKeyCredentialConstants")]
62        /// 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.
63        #[unsafe(method(userVerificationPreference))]
64        #[unsafe(method_family = none)]
65        pub unsafe fn userVerificationPreference(
66            &self,
67        ) -> Retained<ASAuthorizationPublicKeyCredentialUserVerificationPreference>;
68
69        /// A list of allowed credential IDs for this request. An empty list means all credentials are allowed.
70        #[unsafe(method(allowedCredentials))]
71        #[unsafe(method_family = none)]
72        pub unsafe fn allowedCredentials(&self) -> Retained<NSArray<NSData>>;
73
74        #[cfg(feature = "ASPasskeyAssertionCredentialExtensionInput")]
75        /// Inputs for WebAuthn extensions used for passkey assertion.
76        #[unsafe(method(extensionInput))]
77        #[unsafe(method_family = none)]
78        pub unsafe fn extensionInput(
79            &self,
80        ) -> Option<Retained<ASPasskeyAssertionCredentialExtensionInput>>;
81    );
82}
83
84/// Methods declared on superclass `NSObject`.
85impl ASPasskeyCredentialRequestParameters {
86    extern_methods!(
87        #[unsafe(method(new))]
88        #[unsafe(method_family = new)]
89        pub unsafe fn new() -> Retained<Self>;
90    );
91}