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        #[unsafe(method(setChallenge:))]
22        #[unsafe(method_family = none)]
23        unsafe fn setChallenge(&self, challenge: &NSData);
24
25        /// The Relying Party identifier used to scope this request.
26        #[unsafe(method(relyingPartyIdentifier))]
27        #[unsafe(method_family = none)]
28        unsafe fn relyingPartyIdentifier(&self) -> Retained<NSString>;
29
30        /// Setter for [`relyingPartyIdentifier`][Self::relyingPartyIdentifier].
31        #[unsafe(method(setRelyingPartyIdentifier:))]
32        #[unsafe(method_family = none)]
33        unsafe fn setRelyingPartyIdentifier(&self, relying_party_identifier: &NSString);
34
35        #[cfg(feature = "ASAuthorizationPublicKeyCredentialDescriptor")]
36        /// 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.
37        #[unsafe(method(allowedCredentials))]
38        #[unsafe(method_family = none)]
39        unsafe fn allowedCredentials(
40            &self,
41        ) -> Retained<NSArray<ProtocolObject<dyn ASAuthorizationPublicKeyCredentialDescriptor>>>;
42
43        #[cfg(feature = "ASAuthorizationPublicKeyCredentialDescriptor")]
44        /// Setter for [`allowedCredentials`][Self::allowedCredentials].
45        #[unsafe(method(setAllowedCredentials:))]
46        #[unsafe(method_family = none)]
47        unsafe fn setAllowedCredentials(
48            &self,
49            allowed_credentials: &NSArray<
50                ProtocolObject<dyn ASAuthorizationPublicKeyCredentialDescriptor>,
51            >,
52        );
53
54        #[cfg(feature = "ASAuthorizationPublicKeyCredentialConstants")]
55        /// 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.
56        #[unsafe(method(userVerificationPreference))]
57        #[unsafe(method_family = none)]
58        unsafe fn userVerificationPreference(
59            &self,
60        ) -> Retained<ASAuthorizationPublicKeyCredentialUserVerificationPreference>;
61
62        #[cfg(feature = "ASAuthorizationPublicKeyCredentialConstants")]
63        /// Setter for [`userVerificationPreference`][Self::userVerificationPreference].
64        #[unsafe(method(setUserVerificationPreference:))]
65        #[unsafe(method_family = none)]
66        unsafe fn setUserVerificationPreference(
67            &self,
68            user_verification_preference: &ASAuthorizationPublicKeyCredentialUserVerificationPreference,
69        );
70    }
71);