objc2_authentication_services/generated/
ASAuthorizationPublicKeyCredentialAssertionRequest.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/asauthorizationpublickeycredentialassertionrequest?language=objc)
12    pub unsafe trait ASAuthorizationPublicKeyCredentialAssertionRequest:
13        NSObjectProtocol + NSSecureCoding + NSCopying
14    {
15        /// The challenge to use when signing the request.
16        #[unsafe(method(challenge))]
17        #[unsafe(method_family = none)]
18        unsafe fn challenge(&self) -> Retained<NSData>;
19
20        /// Setter for [`challenge`][Self::challenge].
21        ///
22        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
23        #[unsafe(method(setChallenge:))]
24        #[unsafe(method_family = none)]
25        unsafe fn setChallenge(&self, challenge: &NSData);
26
27        /// The Relying Party identifier used to scope this request.
28        #[unsafe(method(relyingPartyIdentifier))]
29        #[unsafe(method_family = none)]
30        unsafe fn relyingPartyIdentifier(&self) -> Retained<NSString>;
31
32        /// Setter for [`relyingPartyIdentifier`][Self::relyingPartyIdentifier].
33        ///
34        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
35        #[unsafe(method(setRelyingPartyIdentifier:))]
36        #[unsafe(method_family = none)]
37        unsafe fn setRelyingPartyIdentifier(&self, relying_party_identifier: &NSString);
38
39        #[cfg(feature = "ASAuthorizationPublicKeyCredentialDescriptor")]
40        /// A list of credentials to allow for this request. If this list is nonempty, only credentials matching the provided descriptors can be used to sign in.
41        #[unsafe(method(allowedCredentials))]
42        #[unsafe(method_family = none)]
43        unsafe fn allowedCredentials(
44            &self,
45        ) -> Retained<NSArray<ProtocolObject<dyn ASAuthorizationPublicKeyCredentialDescriptor>>>;
46
47        #[cfg(feature = "ASAuthorizationPublicKeyCredentialDescriptor")]
48        /// Setter for [`allowedCredentials`][Self::allowedCredentials].
49        ///
50        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
51        #[unsafe(method(setAllowedCredentials:))]
52        #[unsafe(method_family = none)]
53        unsafe fn setAllowedCredentials(
54            &self,
55            allowed_credentials: &NSArray<
56                ProtocolObject<dyn ASAuthorizationPublicKeyCredentialDescriptor>,
57            >,
58        );
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);