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        #[unsafe(method(setUserID:))]
27        #[unsafe(method_family = none)]
28        unsafe fn setUserID(&self, user_id: &NSData);
29
30        /// A human readable name to associate with a credential, which a user should be able to use to identify the credential.
31        #[unsafe(method(name))]
32        #[unsafe(method_family = none)]
33        unsafe fn name(&self) -> Retained<NSString>;
34
35        /// Setter for [`name`][Self::name].
36        #[unsafe(method(setName:))]
37        #[unsafe(method_family = none)]
38        unsafe fn setName(&self, name: &NSString);
39
40        /// A high level human readable name to associate with a credential, which should only be used for display.
41        #[unsafe(method(displayName))]
42        #[unsafe(method_family = none)]
43        unsafe fn displayName(&self) -> Option<Retained<NSString>>;
44
45        /// Setter for [`displayName`][Self::displayName].
46        #[unsafe(method(setDisplayName:))]
47        #[unsafe(method_family = none)]
48        unsafe fn setDisplayName(&self, display_name: Option<&NSString>);
49
50        /// The challenge which can be used to verify the authenticator's attestation, if attestation is requested.
51        #[unsafe(method(challenge))]
52        #[unsafe(method_family = none)]
53        unsafe fn challenge(&self) -> Retained<NSData>;
54
55        /// Setter for [`challenge`][Self::challenge].
56        #[unsafe(method(setChallenge:))]
57        #[unsafe(method_family = none)]
58        unsafe fn setChallenge(&self, challenge: &NSData);
59
60        #[cfg(feature = "ASAuthorizationPublicKeyCredentialConstants")]
61        /// 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.
62        #[unsafe(method(userVerificationPreference))]
63        #[unsafe(method_family = none)]
64        unsafe fn userVerificationPreference(
65            &self,
66        ) -> Retained<ASAuthorizationPublicKeyCredentialUserVerificationPreference>;
67
68        #[cfg(feature = "ASAuthorizationPublicKeyCredentialConstants")]
69        /// Setter for [`userVerificationPreference`][Self::userVerificationPreference].
70        #[unsafe(method(setUserVerificationPreference:))]
71        #[unsafe(method_family = none)]
72        unsafe fn setUserVerificationPreference(
73            &self,
74            user_verification_preference: &ASAuthorizationPublicKeyCredentialUserVerificationPreference,
75        );
76
77        #[cfg(feature = "ASAuthorizationPublicKeyCredentialConstants")]
78        /// A preference for the type of attestation that the authenticator should attempt to perform.
79        #[unsafe(method(attestationPreference))]
80        #[unsafe(method_family = none)]
81        unsafe fn attestationPreference(
82            &self,
83        ) -> Retained<ASAuthorizationPublicKeyCredentialAttestationKind>;
84
85        #[cfg(feature = "ASAuthorizationPublicKeyCredentialConstants")]
86        /// Setter for [`attestationPreference`][Self::attestationPreference].
87        #[unsafe(method(setAttestationPreference:))]
88        #[unsafe(method_family = none)]
89        unsafe fn setAttestationPreference(
90            &self,
91            attestation_preference: &ASAuthorizationPublicKeyCredentialAttestationKind,
92        );
93    }
94);