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