objc2_authentication_services/generated/
ASAuthorizationPublicKeyCredentialRegistrationRequest.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_protocol!(
11    /// [Apple's documentation](https://developer.apple.com/documentation/authenticationservices/asauthorizationpublickeycredentialregistrationrequest?language=objc)
12    pub unsafe trait ASAuthorizationPublicKeyCredentialRegistrationRequest:
13        NSObjectProtocol + NSSecureCoding + NSCopying
14    {
15        /// The Relying Party identifier used to scope this request.
16        #[unsafe(method(relyingPartyIdentifier))]
17        #[unsafe(method_family = none)]
18        unsafe fn relyingPartyIdentifier(&self) -> Retained<NSString>;
19
20        /// An arbitrary byte sequence which will be stored alongside the credential and will be returned with the credential when authenticating with it in the future. May be used by a relying party to identify the user account this credential is associated with.
21        #[unsafe(method(userID))]
22        #[unsafe(method_family = none)]
23        unsafe fn userID(&self) -> Retained<NSData>;
24
25        /// Setter for [`userID`][Self::userID].
26        ///
27        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
28        #[unsafe(method(setUserID:))]
29        #[unsafe(method_family = none)]
30        unsafe fn setUserID(&self, user_id: &NSData);
31
32        /// A human readable name to associate with a credential, which a user should be able to use to identify the credential.
33        #[unsafe(method(name))]
34        #[unsafe(method_family = none)]
35        unsafe fn name(&self) -> Retained<NSString>;
36
37        /// Setter for [`name`][Self::name].
38        ///
39        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
40        #[unsafe(method(setName:))]
41        #[unsafe(method_family = none)]
42        unsafe fn setName(&self, name: &NSString);
43
44        /// A high level human readable name to associate with a credential, which should only be used for display.
45        #[unsafe(method(displayName))]
46        #[unsafe(method_family = none)]
47        unsafe fn displayName(&self) -> Option<Retained<NSString>>;
48
49        /// Setter for [`displayName`][Self::displayName].
50        ///
51        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
52        #[unsafe(method(setDisplayName:))]
53        #[unsafe(method_family = none)]
54        unsafe fn setDisplayName(&self, display_name: Option<&NSString>);
55
56        /// The challenge which can be used to verify the authenticator's attestation, if attestation is requested.
57        #[unsafe(method(challenge))]
58        #[unsafe(method_family = none)]
59        unsafe fn challenge(&self) -> Retained<NSData>;
60
61        /// Setter for [`challenge`][Self::challenge].
62        ///
63        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
64        #[unsafe(method(setChallenge:))]
65        #[unsafe(method_family = none)]
66        unsafe fn setChallenge(&self, challenge: &NSData);
67
68        #[cfg(feature = "ASAuthorizationPublicKeyCredentialConstants")]
69        /// 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.
70        #[unsafe(method(userVerificationPreference))]
71        #[unsafe(method_family = none)]
72        unsafe fn userVerificationPreference(
73            &self,
74        ) -> Retained<ASAuthorizationPublicKeyCredentialUserVerificationPreference>;
75
76        #[cfg(feature = "ASAuthorizationPublicKeyCredentialConstants")]
77        /// Setter for [`userVerificationPreference`][Self::userVerificationPreference].
78        #[unsafe(method(setUserVerificationPreference:))]
79        #[unsafe(method_family = none)]
80        unsafe fn setUserVerificationPreference(
81            &self,
82            user_verification_preference: &ASAuthorizationPublicKeyCredentialUserVerificationPreference,
83        );
84
85        #[cfg(feature = "ASAuthorizationPublicKeyCredentialConstants")]
86        /// A preference for the type of attestation that the authenticator should attempt to perform.
87        #[unsafe(method(attestationPreference))]
88        #[unsafe(method_family = none)]
89        unsafe fn attestationPreference(
90            &self,
91        ) -> Retained<ASAuthorizationPublicKeyCredentialAttestationKind>;
92
93        #[cfg(feature = "ASAuthorizationPublicKeyCredentialConstants")]
94        /// Setter for [`attestationPreference`][Self::attestationPreference].
95        #[unsafe(method(setAttestationPreference:))]
96        #[unsafe(method_family = none)]
97        unsafe fn setAttestationPreference(
98            &self,
99            attestation_preference: &ASAuthorizationPublicKeyCredentialAttestationKind,
100        );
101    }
102);