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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
//! 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_class!(
/// An ASPasswordCredentialIdentity is used to describe an identity that can use a service upon successful passkey based authentication.
/// Use this class to save entries into ASCredentialIdentityStore.
///
/// See also [Apple's documentation](https://developer.apple.com/documentation/authenticationservices/aspasskeycredentialidentity?language=objc)
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct ASPasskeyCredentialIdentity;
);
#[cfg(feature = "ASCredentialIdentity")]
extern_conformance!(
unsafe impl ASCredentialIdentity for ASPasskeyCredentialIdentity {}
);
extern_conformance!(
unsafe impl NSCoding for ASPasskeyCredentialIdentity {}
);
extern_conformance!(
unsafe impl NSCopying for ASPasskeyCredentialIdentity {}
);
unsafe impl CopyingHelper for ASPasskeyCredentialIdentity {
type Result = Self;
}
extern_conformance!(
unsafe impl NSObjectProtocol for ASPasskeyCredentialIdentity {}
);
extern_conformance!(
unsafe impl NSSecureCoding for ASPasskeyCredentialIdentity {}
);
impl ASPasskeyCredentialIdentity {
extern_methods!(
#[unsafe(method(init))]
#[unsafe(method_family = init)]
pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
/// Initialize an instance of ASPasskeyCredentialIdentity.
///
/// Parameter `relyingPartyIdentifier`: relying party for this credential.
///
/// Parameter `userName`: user name associated with this credential.
///
/// Parameter `credentialID`: credential ID of this passkey credential.
///
/// Parameter `userHandle`: user handle data of this passkey credential.
///
/// Parameter `recordIdentifier`: identifier used by credential provider extension to identify this credential.
#[unsafe(method(initWithRelyingPartyIdentifier:userName:credentialID:userHandle:recordIdentifier:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithRelyingPartyIdentifier_userName_credentialID_userHandle_recordIdentifier(
this: Allocated<Self>,
relying_party_identifier: &NSString,
user_name: &NSString,
credential_id: &NSData,
user_handle: &NSData,
record_identifier: Option<&NSString>,
) -> Retained<Self>;
/// Create and initialize an instance of ASPasskeyCredentialIdentity.
///
/// Parameter `relyingPartyIdentifier`: relying party for this credential.
///
/// Parameter `userName`: user name associated with this credential.
///
/// Parameter `credentialID`: credential ID of this passkey credential.
///
/// Parameter `userHandle`: user handle data of this passkey credential.
///
/// Parameter `recordIdentifier`: identifier used by credential provider extension to identify this credential.
#[unsafe(method(identityWithRelyingPartyIdentifier:userName:credentialID:userHandle:recordIdentifier:))]
#[unsafe(method_family = none)]
pub unsafe fn identityWithRelyingPartyIdentifier_userName_credentialID_userHandle_recordIdentifier(
relying_party_identifier: &NSString,
user_name: &NSString,
credential_id: &NSData,
user_handle: &NSData,
record_identifier: Option<&NSString>,
) -> Retained<Self>;
/// The relying party identifier of this passkey credential.
///
/// This field is reported as the serviceIdentifier property of ASCredentialIdentity.
#[unsafe(method(relyingPartyIdentifier))]
#[unsafe(method_family = none)]
pub unsafe fn relyingPartyIdentifier(&self) -> Retained<NSString>;
/// The user name of this passkey credential.
///
/// This field is reported as the user property of ASCredentialIdentity.
#[unsafe(method(userName))]
#[unsafe(method_family = none)]
pub unsafe fn userName(&self) -> Retained<NSString>;
/// The credential ID of this passkey credential.
///
/// This field is used to identify the correct credential to use based on relying party request parameters.
#[unsafe(method(credentialID))]
#[unsafe(method_family = none)]
pub unsafe fn credentialID(&self) -> Retained<NSData>;
/// The user handle of this passkey credential.
///
/// This field is used to identify the correct credential to use based on relying party request parameters.
#[unsafe(method(userHandle))]
#[unsafe(method_family = none)]
pub unsafe fn userHandle(&self) -> Retained<NSData>;
/// Get the record identifier.
///
/// Returns: The record identifier.
///
/// You can utilize the record identifier to uniquely identify the credential identity in your local database.
#[unsafe(method(recordIdentifier))]
#[unsafe(method_family = none)]
pub unsafe fn recordIdentifier(&self) -> Option<Retained<NSString>>;
/// Get or set the rank of the credential identity object.
///
/// The system may utilize the rank to decide which credential identity precedes the other
/// if two identities have the same service identifier. A credential identity with a larger rank value
/// precedes one with a smaller value if both credential identities have the same service identifier.
/// The default value of this property is 0.
#[unsafe(method(rank))]
#[unsafe(method_family = none)]
pub unsafe fn rank(&self) -> NSInteger;
/// Setter for [`rank`][Self::rank].
#[unsafe(method(setRank:))]
#[unsafe(method_family = none)]
pub unsafe fn setRank(&self, rank: NSInteger);
);
}
/// Methods declared on superclass `NSObject`.
impl ASPasskeyCredentialIdentity {
extern_methods!(
#[unsafe(method(new))]
#[unsafe(method_family = new)]
pub unsafe fn new() -> Retained<Self>;
);
}