objc2_authentication_services/generated/
ASAuthorizationProviderExtensionLoginConfiguration.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#[cfg(feature = "objc2-security")]
8use objc2_security::*;
9
10use crate::*;
11
12extern_class!(
13    /// [Apple's documentation](https://developer.apple.com/documentation/authenticationservices/asauthorizationproviderextensionkerberosmapping?language=objc)
14    #[unsafe(super(NSObject))]
15    #[derive(Debug, PartialEq, Eq, Hash)]
16    pub struct ASAuthorizationProviderExtensionKerberosMapping;
17);
18
19extern_conformance!(
20    unsafe impl NSObjectProtocol for ASAuthorizationProviderExtensionKerberosMapping {}
21);
22
23impl ASAuthorizationProviderExtensionKerberosMapping {
24    extern_methods!(
25        /// The keypath in the response JSON that uses this set of mappings.
26        ///
27        /// If the response tokens from login contain this keypath, then the mapping in this class will be used to create a Kerberos ticket. The expected response is a JSON dictionary with the supplied key names.
28        #[unsafe(method(ticketKeyPath))]
29        #[unsafe(method_family = none)]
30        pub unsafe fn ticketKeyPath(&self) -> Option<Retained<NSString>>;
31
32        /// Setter for [`ticketKeyPath`][Self::ticketKeyPath].
33        ///
34        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
35        #[unsafe(method(setTicketKeyPath:))]
36        #[unsafe(method_family = none)]
37        pub unsafe fn setTicketKeyPath(&self, ticket_key_path: Option<&NSString>);
38
39        /// The key name that contains the base64 encoded kerberos AS-REP string.
40        #[unsafe(method(messageBufferKeyName))]
41        #[unsafe(method_family = none)]
42        pub unsafe fn messageBufferKeyName(&self) -> Option<Retained<NSString>>;
43
44        /// Setter for [`messageBufferKeyName`][Self::messageBufferKeyName].
45        ///
46        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
47        #[unsafe(method(setMessageBufferKeyName:))]
48        #[unsafe(method_family = none)]
49        pub unsafe fn setMessageBufferKeyName(&self, message_buffer_key_name: Option<&NSString>);
50
51        /// The key name that contains the Kerberos Realm string.
52        #[unsafe(method(realmKeyName))]
53        #[unsafe(method_family = none)]
54        pub unsafe fn realmKeyName(&self) -> Option<Retained<NSString>>;
55
56        /// Setter for [`realmKeyName`][Self::realmKeyName].
57        ///
58        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
59        #[unsafe(method(setRealmKeyName:))]
60        #[unsafe(method_family = none)]
61        pub unsafe fn setRealmKeyName(&self, realm_key_name: Option<&NSString>);
62
63        /// The key name that contains the Kerberos service name string.
64        #[unsafe(method(serviceNameKeyName))]
65        #[unsafe(method_family = none)]
66        pub unsafe fn serviceNameKeyName(&self) -> Option<Retained<NSString>>;
67
68        /// Setter for [`serviceNameKeyName`][Self::serviceNameKeyName].
69        ///
70        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
71        #[unsafe(method(setServiceNameKeyName:))]
72        #[unsafe(method_family = none)]
73        pub unsafe fn setServiceNameKeyName(&self, service_name_key_name: Option<&NSString>);
74
75        /// The key name that contains the Kerberos client name string.
76        #[unsafe(method(clientNameKeyName))]
77        #[unsafe(method_family = none)]
78        pub unsafe fn clientNameKeyName(&self) -> Option<Retained<NSString>>;
79
80        /// Setter for [`clientNameKeyName`][Self::clientNameKeyName].
81        ///
82        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
83        #[unsafe(method(setClientNameKeyName:))]
84        #[unsafe(method_family = none)]
85        pub unsafe fn setClientNameKeyName(&self, client_name_key_name: Option<&NSString>);
86
87        /// The key name that contains the Kerberos session key type number.
88        ///
89        /// The value for this key should be the correct encryption type per RFC3962, section 7 for the session key.
90        #[unsafe(method(encryptionKeyTypeKeyName))]
91        #[unsafe(method_family = none)]
92        pub unsafe fn encryptionKeyTypeKeyName(&self) -> Option<Retained<NSString>>;
93
94        /// Setter for [`encryptionKeyTypeKeyName`][Self::encryptionKeyTypeKeyName].
95        ///
96        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
97        #[unsafe(method(setEncryptionKeyTypeKeyName:))]
98        #[unsafe(method_family = none)]
99        pub unsafe fn setEncryptionKeyTypeKeyName(
100            &self,
101            encryption_key_type_key_name: Option<&NSString>,
102        );
103
104        /// The key name that contains the Kerberos session key.
105        #[unsafe(method(sessionKeyKeyName))]
106        #[unsafe(method_family = none)]
107        pub unsafe fn sessionKeyKeyName(&self) -> Option<Retained<NSString>>;
108
109        /// Setter for [`sessionKeyKeyName`][Self::sessionKeyKeyName].
110        ///
111        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
112        #[unsafe(method(setSessionKeyKeyName:))]
113        #[unsafe(method_family = none)]
114        pub unsafe fn setSessionKeyKeyName(&self, session_key_key_name: Option<&NSString>);
115    );
116}
117
118/// Methods declared on superclass `NSObject`.
119impl ASAuthorizationProviderExtensionKerberosMapping {
120    extern_methods!(
121        #[unsafe(method(init))]
122        #[unsafe(method_family = init)]
123        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
124
125        #[unsafe(method(new))]
126        #[unsafe(method_family = new)]
127        pub unsafe fn new() -> Retained<Self>;
128    );
129}
130
131/// [Apple's documentation](https://developer.apple.com/documentation/authenticationservices/asauthorizationproviderextensionfederationtype?language=objc)
132// NS_ENUM
133#[repr(transparent)]
134#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
135pub struct ASAuthorizationProviderExtensionFederationType(pub NSInteger);
136impl ASAuthorizationProviderExtensionFederationType {
137    #[doc(alias = "ASAuthorizationProviderExtensionFederationTypeNone")]
138    pub const None: Self = Self(0);
139    #[doc(alias = "ASAuthorizationProviderExtensionFederationTypeWSTrust")]
140    pub const WSTrust: Self = Self(1);
141    #[doc(alias = "ASAuthorizationProviderExtensionFederationTypeDynamicWSTrust")]
142    pub const DynamicWSTrust: Self = Self(2);
143}
144
145unsafe impl Encode for ASAuthorizationProviderExtensionFederationType {
146    const ENCODING: Encoding = NSInteger::ENCODING;
147}
148
149unsafe impl RefEncode for ASAuthorizationProviderExtensionFederationType {
150    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
151}
152
153/// [Apple's documentation](https://developer.apple.com/documentation/authenticationservices/asauthorizationproviderextensionusersecureenclavekeybiometricpolicy?language=objc)
154// NS_OPTIONS
155#[repr(transparent)]
156#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
157pub struct ASAuthorizationProviderExtensionUserSecureEnclaveKeyBiometricPolicy(pub NSUInteger);
158bitflags::bitflags! {
159    impl ASAuthorizationProviderExtensionUserSecureEnclaveKeyBiometricPolicy: NSUInteger {
160        #[doc(alias = "ASAuthorizationProviderExtensionUserSecureEnclaveKeyBiometricPolicyNone")]
161        const None = 0;
162        #[doc(alias = "ASAuthorizationProviderExtensionUserSecureEnclaveKeyBiometricPolicyTouchIDOrWatchCurrentSet")]
163        const TouchIDOrWatchCurrentSet = 1<<0;
164        #[doc(alias = "ASAuthorizationProviderExtensionUserSecureEnclaveKeyBiometricPolicyTouchIDOrWatchAny")]
165        const TouchIDOrWatchAny = 1<<1;
166        #[doc(alias = "ASAuthorizationProviderExtensionUserSecureEnclaveKeyBiometricPolicyReuseDuringUnlock")]
167        const ReuseDuringUnlock = 1<<2;
168        #[doc(alias = "ASAuthorizationProviderExtensionUserSecureEnclaveKeyBiometricPolicyPasswordFallback")]
169        const PasswordFallback = 1<<3;
170    }
171}
172
173unsafe impl Encode for ASAuthorizationProviderExtensionUserSecureEnclaveKeyBiometricPolicy {
174    const ENCODING: Encoding = NSUInteger::ENCODING;
175}
176
177unsafe impl RefEncode for ASAuthorizationProviderExtensionUserSecureEnclaveKeyBiometricPolicy {
178    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
179}
180
181/// [Apple's documentation](https://developer.apple.com/documentation/authenticationservices/asauthorizationproviderextensionencryptionalgorithm?language=objc)
182// NS_TYPED_EXTENSIBLE_ENUM
183pub type ASAuthorizationProviderExtensionEncryptionAlgorithm = NSNumber;
184
185extern "C" {
186    /// A encryption algorithm that uses NIST P-256 elliptic curve key agreement, ConcatKDF key derivation
187    /// with a 256-bit digest, and the Advanced Encryption Standard cipher in Galois/Counter Mode with a key length of 256 bits.
188    ///
189    /// See also [Apple's documentation](https://developer.apple.com/documentation/authenticationservices/asauthorizationproviderextensionencryptionalgorithmecdhe_a256gcm?language=objc)
190    pub static ASAuthorizationProviderExtensionEncryptionAlgorithmECDHE_A256GCM:
191        &'static ASAuthorizationProviderExtensionEncryptionAlgorithm;
192}
193
194extern "C" {
195    /// A cipher suite for HPKE that uses NIST P-256 elliptic curve key agreement, SHA-2 key derivation
196    /// with a 256-bit digest, and the Advanced Encryption Standard cipher in Galois/Counter Mode with a key length of 256 bits.
197    ///
198    /// See also [Apple's documentation](https://developer.apple.com/documentation/authenticationservices/asauthorizationproviderextensionencryptionalgorithmhpke_p256_sha256_aes_gcm_256?language=objc)
199    pub static ASAuthorizationProviderExtensionEncryptionAlgorithmHPKE_P256_SHA256_AES_GCM_256:
200        &'static ASAuthorizationProviderExtensionEncryptionAlgorithm;
201}
202
203extern "C" {
204    /// A cipher suite that you use for HPKE using NIST P-384 elliptic curve key agreement, SHA-2 key derivation
205    /// with a 384-bit digest, and the Advanced Encryption Standard cipher in Galois/Counter Mode with a key length of 256 bits.
206    ///
207    /// See also [Apple's documentation](https://developer.apple.com/documentation/authenticationservices/asauthorizationproviderextensionencryptionalgorithmhpke_p384_sha384_aes_gcm_256?language=objc)
208    pub static ASAuthorizationProviderExtensionEncryptionAlgorithmHPKE_P384_SHA384_AES_GCM_256:
209        &'static ASAuthorizationProviderExtensionEncryptionAlgorithm;
210}
211
212extern "C" {
213    /// A cipher suite for HPKE that uses X25519 elliptic curve key agreement, SHA-2 key derivation
214    /// with a 256-bit digest, and the ChaCha20 stream cipher with the Poly1305 message authentication code.
215    ///
216    /// See also [Apple's documentation](https://developer.apple.com/documentation/authenticationservices/asauthorizationproviderextensionencryptionalgorithmhpke_curve25519_sha256_chachapoly?language=objc)
217    pub static ASAuthorizationProviderExtensionEncryptionAlgorithmHPKE_Curve25519_SHA256_ChachaPoly:
218        &'static ASAuthorizationProviderExtensionEncryptionAlgorithm;
219}
220
221/// [Apple's documentation](https://developer.apple.com/documentation/authenticationservices/asauthorizationproviderextensionsigningalgorithm?language=objc)
222// NS_TYPED_EXTENSIBLE_ENUM
223pub type ASAuthorizationProviderExtensionSigningAlgorithm = NSNumber;
224
225extern "C" {
226    /// [Apple's documentation](https://developer.apple.com/documentation/authenticationservices/asauthorizationproviderextensionsigningalgorithmes256?language=objc)
227    pub static ASAuthorizationProviderExtensionSigningAlgorithmES256:
228        &'static ASAuthorizationProviderExtensionSigningAlgorithm;
229}
230
231extern "C" {
232    /// [Apple's documentation](https://developer.apple.com/documentation/authenticationservices/asauthorizationproviderextensionsigningalgorithmes384?language=objc)
233    pub static ASAuthorizationProviderExtensionSigningAlgorithmES384:
234        &'static ASAuthorizationProviderExtensionSigningAlgorithm;
235}
236
237extern "C" {
238    /// [Apple's documentation](https://developer.apple.com/documentation/authenticationservices/asauthorizationproviderextensionsigningalgorithmed25519?language=objc)
239    pub static ASAuthorizationProviderExtensionSigningAlgorithmEd25519:
240        &'static ASAuthorizationProviderExtensionSigningAlgorithm;
241}
242
243extern_class!(
244    /// [Apple's documentation](https://developer.apple.com/documentation/authenticationservices/asauthorizationproviderextensionloginconfiguration?language=objc)
245    #[unsafe(super(NSObject))]
246    #[derive(Debug, PartialEq, Eq, Hash)]
247    pub struct ASAuthorizationProviderExtensionLoginConfiguration;
248);
249
250extern_conformance!(
251    unsafe impl NSObjectProtocol for ASAuthorizationProviderExtensionLoginConfiguration {}
252);
253
254impl ASAuthorizationProviderExtensionLoginConfiguration {
255    extern_methods!(
256        #[unsafe(method(new))]
257        #[unsafe(method_family = new)]
258        pub unsafe fn new() -> Retained<Self>;
259
260        #[unsafe(method(init))]
261        #[unsafe(method_family = init)]
262        pub unsafe fn init(this: Allocated<Self>) -> Retained<Self>;
263
264        /// Initializes an ASAuthorizationProviderExtensionLoginConfiguration class with the required values.
265        ///
266        /// Parameter `clientID`: The client_id for the Apple platform SSO login at the identity provider.
267        ///
268        /// Parameter `issuer`: The issuer for the requests, used to validate responses.
269        ///
270        /// Parameter `tokenEndpointURL`: The token endpoint at the idP for login.
271        ///
272        /// Parameter `jwksEndpointURL`: The JWKS URL at the idP for validating tokens.
273        ///
274        /// Parameter `audience`: The audience used for signed assertions.  This should be the tenent at the idP.
275        ///
276        /// Returns: An instance of a ASAuthorizationProviderExtensionLoginConfiguration.
277        #[unsafe(method(initWithClientID:issuer:tokenEndpointURL:jwksEndpointURL:audience:))]
278        #[unsafe(method_family = init)]
279        pub unsafe fn initWithClientID_issuer_tokenEndpointURL_jwksEndpointURL_audience(
280            this: Allocated<Self>,
281            client_id: &NSString,
282            issuer: &NSString,
283            token_endpoint_url: &NSURL,
284            jwks_endpoint_url: &NSURL,
285            audience: Option<&NSString>,
286        ) -> Retained<Self>;
287
288        #[cfg(feature = "block2")]
289        /// Creates a login configuration using the OpenID configuration.
290        ///
291        /// Parameter `openIDConfigurationURL`: The base URL to load the .well-known/openid-configuration.
292        ///
293        /// Parameter `clientID`: The client_id for the Apple platform SSO login at the identity provider.
294        ///
295        /// Parameter `issuer`: The issuer for the requests, used to validate responses.
296        ///
297        /// Parameter `completion`: The completion called when it is complete or the error.
298        #[unsafe(method(configurationWithOpenIDConfigurationURL:clientID:issuer:completion:))]
299        #[unsafe(method_family = none)]
300        pub unsafe fn configurationWithOpenIDConfigurationURL_clientID_issuer_completion(
301            open_id_configuration_url: &NSURL,
302            client_id: &NSString,
303            issuer: Option<&NSString>,
304            completion: &block2::DynBlock<
305                dyn Fn(*mut ASAuthorizationProviderExtensionLoginConfiguration, *mut NSError),
306            >,
307        );
308
309        /// Predicate string used to identify invalid credential errors.
310        ///
311        /// If there is an HTTP 400 or HTTP 401 error when authenticating, this predicate will be used on the response body JSON to determine if the error is due to an invalid password or something else.  If nil, then only an HTTP 401 will be used for an invalid credential.
312        #[unsafe(method(invalidCredentialPredicate))]
313        #[unsafe(method_family = none)]
314        pub unsafe fn invalidCredentialPredicate(&self) -> Option<Retained<NSString>>;
315
316        /// Setter for [`invalidCredentialPredicate`][Self::invalidCredentialPredicate].
317        ///
318        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
319        #[unsafe(method(setInvalidCredentialPredicate:))]
320        #[unsafe(method_family = none)]
321        pub unsafe fn setInvalidCredentialPredicate(
322            &self,
323            invalid_credential_predicate: Option<&NSString>,
324        );
325
326        /// The display name for the account.  Used for notifications and login prompts.
327        #[unsafe(method(accountDisplayName))]
328        #[unsafe(method_family = none)]
329        pub unsafe fn accountDisplayName(&self) -> Option<Retained<NSString>>;
330
331        /// Setter for [`accountDisplayName`][Self::accountDisplayName].
332        ///
333        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
334        #[unsafe(method(setAccountDisplayName:))]
335        #[unsafe(method_family = none)]
336        pub unsafe fn setAccountDisplayName(&self, account_display_name: Option<&NSString>);
337
338        /// The login client_id.
339        #[unsafe(method(clientID))]
340        #[unsafe(method_family = none)]
341        pub unsafe fn clientID(&self) -> Retained<NSString>;
342
343        /// The issuer for validation.
344        #[unsafe(method(issuer))]
345        #[unsafe(method_family = none)]
346        pub unsafe fn issuer(&self) -> Retained<NSString>;
347
348        /// The audience for validation and requests.
349        #[unsafe(method(audience))]
350        #[unsafe(method_family = none)]
351        pub unsafe fn audience(&self) -> Retained<NSString>;
352
353        /// Setter for [`audience`][Self::audience].
354        ///
355        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
356        #[unsafe(method(setAudience:))]
357        #[unsafe(method_family = none)]
358        pub unsafe fn setAudience(&self, audience: &NSString);
359
360        /// Token Endpoint URL for login request.
361        #[unsafe(method(tokenEndpointURL))]
362        #[unsafe(method_family = none)]
363        pub unsafe fn tokenEndpointURL(&self) -> Retained<NSURL>;
364
365        /// Setter for [`tokenEndpointURL`][Self::tokenEndpointURL].
366        ///
367        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
368        #[unsafe(method(setTokenEndpointURL:))]
369        #[unsafe(method_family = none)]
370        pub unsafe fn setTokenEndpointURL(&self, token_endpoint_url: &NSURL);
371
372        /// JWKS Endpoint URL for keys.
373        #[unsafe(method(jwksEndpointURL))]
374        #[unsafe(method_family = none)]
375        pub unsafe fn jwksEndpointURL(&self) -> Retained<NSURL>;
376
377        /// Setter for [`jwksEndpointURL`][Self::jwksEndpointURL].
378        ///
379        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
380        #[unsafe(method(setJwksEndpointURL:))]
381        #[unsafe(method_family = none)]
382        pub unsafe fn setJwksEndpointURL(&self, jwks_endpoint_url: &NSURL);
383
384        /// The root certificates to use for trust evaluation of jwks keys.
385        ///
386        /// if set, certificates will be required in jwks responses and evaluated using the supplied certificates.  If the jwks certificates are missing or fail trust evaluation the login will fail.
387        #[unsafe(method(jwksTrustedRootCertificates))]
388        #[unsafe(method_family = none)]
389        pub unsafe fn jwksTrustedRootCertificates(&self) -> Retained<NSArray>;
390
391        /// Setter for [`jwksTrustedRootCertificates`][Self::jwksTrustedRootCertificates].
392        ///
393        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
394        ///
395        /// # Safety
396        ///
397        /// `jwks_trusted_root_certificates` generic should be of the correct type.
398        #[unsafe(method(setJwksTrustedRootCertificates:))]
399        #[unsafe(method_family = none)]
400        pub unsafe fn setJwksTrustedRootCertificates(
401            &self,
402            jwks_trusted_root_certificates: &NSArray,
403        );
404
405        /// The device context for storing device meta data.
406        #[unsafe(method(deviceContext))]
407        #[unsafe(method_family = none)]
408        pub unsafe fn deviceContext(&self) -> Option<Retained<NSData>>;
409
410        /// Setter for [`deviceContext`][Self::deviceContext].
411        ///
412        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
413        #[unsafe(method(setDeviceContext:))]
414        #[unsafe(method_family = none)]
415        pub unsafe fn setDeviceContext(&self, device_context: Option<&NSData>);
416
417        /// The biometric policy for User Secure Enclave Key authentication.
418        #[unsafe(method(userSecureEnclaveKeyBiometricPolicy))]
419        #[unsafe(method_family = none)]
420        pub unsafe fn userSecureEnclaveKeyBiometricPolicy(
421            &self,
422        ) -> ASAuthorizationProviderExtensionUserSecureEnclaveKeyBiometricPolicy;
423
424        /// Setter for [`userSecureEnclaveKeyBiometricPolicy`][Self::userSecureEnclaveKeyBiometricPolicy].
425        #[unsafe(method(setUserSecureEnclaveKeyBiometricPolicy:))]
426        #[unsafe(method_family = none)]
427        pub unsafe fn setUserSecureEnclaveKeyBiometricPolicy(
428            &self,
429            user_secure_enclave_key_biometric_policy: ASAuthorizationProviderExtensionUserSecureEnclaveKeyBiometricPolicy,
430        );
431
432        /// Nonce Endpoint URL, defaults to token tokenEndpointURL.
433        #[unsafe(method(nonceEndpointURL))]
434        #[unsafe(method_family = none)]
435        pub unsafe fn nonceEndpointURL(&self) -> Retained<NSURL>;
436
437        /// Setter for [`nonceEndpointURL`][Self::nonceEndpointURL].
438        ///
439        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
440        #[unsafe(method(setNonceEndpointURL:))]
441        #[unsafe(method_family = none)]
442        pub unsafe fn setNonceEndpointURL(&self, nonce_endpoint_url: &NSURL);
443
444        /// The keypath in the nonce response that contains the nonce value.
445        #[unsafe(method(nonceResponseKeypath))]
446        #[unsafe(method_family = none)]
447        pub unsafe fn nonceResponseKeypath(&self) -> Retained<NSString>;
448
449        /// Setter for [`nonceResponseKeypath`][Self::nonceResponseKeypath].
450        ///
451        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
452        #[unsafe(method(setNonceResponseKeypath:))]
453        #[unsafe(method_family = none)]
454        pub unsafe fn setNonceResponseKeypath(&self, nonce_response_keypath: &NSString);
455
456        /// The name of the server nonce claim when included in authentication requests.
457        #[unsafe(method(serverNonceClaimName))]
458        #[unsafe(method_family = none)]
459        pub unsafe fn serverNonceClaimName(&self) -> Retained<NSString>;
460
461        /// Setter for [`serverNonceClaimName`][Self::serverNonceClaimName].
462        ///
463        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
464        #[unsafe(method(setServerNonceClaimName:))]
465        #[unsafe(method_family = none)]
466        pub unsafe fn setServerNonceClaimName(&self, server_nonce_claim_name: &NSString);
467
468        /// Custom values added to the server nonce POST request body.
469        #[unsafe(method(customNonceRequestValues))]
470        #[unsafe(method_family = none)]
471        pub unsafe fn customNonceRequestValues(&self) -> Retained<NSArray<NSURLQueryItem>>;
472
473        /// Setter for [`customNonceRequestValues`][Self::customNonceRequestValues].
474        ///
475        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
476        #[unsafe(method(setCustomNonceRequestValues:))]
477        #[unsafe(method_family = none)]
478        pub unsafe fn setCustomNonceRequestValues(
479            &self,
480            custom_nonce_request_values: &NSArray<NSURLQueryItem>,
481        );
482
483        /// Sets custom claims to be added to the embedded assertion request header.
484        ///
485        /// Parameter `claims`: The claims to be added. It must serialize as valid JSON to be accepted.
486        ///
487        /// Parameter `error`: Nil or an NSError indicating why the claims were rejected.
488        ///
489        /// Returns: YES when successful and NO when claims are rejected.
490        ///
491        /// # Safety
492        ///
493        /// `claims` generic should be of the correct type.
494        #[unsafe(method(setCustomAssertionRequestHeaderClaims:returningError:_))]
495        #[unsafe(method_family = none)]
496        pub unsafe fn setCustomAssertionRequestHeaderClaims_returningError(
497            &self,
498            claims: &NSDictionary<NSString, AnyObject>,
499        ) -> Result<(), Retained<NSError>>;
500
501        /// Sets custom claims to be added to the embedded assertion request body.
502        ///
503        /// Parameter `claims`: The claims to be added. It must serialize as valid JSON to be accepted.
504        ///
505        /// Parameter `error`: Nil or an NSError indicating why the claims were rejected.
506        ///
507        /// Returns: YES when successful and NO when claims are rejected.
508        ///
509        /// # Safety
510        ///
511        /// `claims` generic should be of the correct type.
512        #[unsafe(method(setCustomAssertionRequestBodyClaims:returningError:_))]
513        #[unsafe(method_family = none)]
514        pub unsafe fn setCustomAssertionRequestBodyClaims_returningError(
515            &self,
516            claims: &NSDictionary<NSString, AnyObject>,
517        ) -> Result<(), Retained<NSError>>;
518
519        /// Additional login scopes.
520        #[unsafe(method(additionalScopes))]
521        #[unsafe(method_family = none)]
522        pub unsafe fn additionalScopes(&self) -> Retained<NSString>;
523
524        /// Setter for [`additionalScopes`][Self::additionalScopes].
525        ///
526        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
527        #[unsafe(method(setAdditionalScopes:))]
528        #[unsafe(method_family = none)]
529        pub unsafe fn setAdditionalScopes(&self, additional_scopes: &NSString);
530
531        /// Additional authorization scopes.
532        #[unsafe(method(additionalAuthorizationScopes))]
533        #[unsafe(method_family = none)]
534        pub unsafe fn additionalAuthorizationScopes(&self) -> Option<Retained<NSString>>;
535
536        /// Setter for [`additionalAuthorizationScopes`][Self::additionalAuthorizationScopes].
537        ///
538        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
539        #[unsafe(method(setAdditionalAuthorizationScopes:))]
540        #[unsafe(method_family = none)]
541        pub unsafe fn setAdditionalAuthorizationScopes(
542            &self,
543            additional_authorization_scopes: Option<&NSString>,
544        );
545
546        /// If true and there is a refresh token for the user in the SSO tokens, it will be included in the login request.
547        #[unsafe(method(includePreviousRefreshTokenInLoginRequest))]
548        #[unsafe(method_family = none)]
549        pub unsafe fn includePreviousRefreshTokenInLoginRequest(&self) -> bool;
550
551        /// Setter for [`includePreviousRefreshTokenInLoginRequest`][Self::includePreviousRefreshTokenInLoginRequest].
552        #[unsafe(method(setIncludePreviousRefreshTokenInLoginRequest:))]
553        #[unsafe(method_family = none)]
554        pub unsafe fn setIncludePreviousRefreshTokenInLoginRequest(
555            &self,
556            include_previous_refresh_token_in_login_request: bool,
557        );
558
559        /// The claim name for the previous SSO token value in the login request.
560        #[unsafe(method(previousRefreshTokenClaimName))]
561        #[unsafe(method_family = none)]
562        pub unsafe fn previousRefreshTokenClaimName(&self) -> Retained<NSString>;
563
564        /// Setter for [`previousRefreshTokenClaimName`][Self::previousRefreshTokenClaimName].
565        ///
566        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
567        #[unsafe(method(setPreviousRefreshTokenClaimName:))]
568        #[unsafe(method_family = none)]
569        pub unsafe fn setPreviousRefreshTokenClaimName(
570            &self,
571            previous_refresh_token_claim_name: &NSString,
572        );
573
574        /// The request parameter name for the JWT.  The default is "assertion".
575        #[unsafe(method(customRequestJWTParameterName))]
576        #[unsafe(method_family = none)]
577        pub unsafe fn customRequestJWTParameterName(&self) -> Option<Retained<NSString>>;
578
579        /// Setter for [`customRequestJWTParameterName`][Self::customRequestJWTParameterName].
580        ///
581        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
582        #[unsafe(method(setCustomRequestJWTParameterName:))]
583        #[unsafe(method_family = none)]
584        pub unsafe fn setCustomRequestJWTParameterName(
585            &self,
586            custom_request_jwt_parameter_name: Option<&NSString>,
587        );
588
589        /// Custom values added to the login POST request body.
590        #[unsafe(method(customLoginRequestValues))]
591        #[unsafe(method_family = none)]
592        pub unsafe fn customLoginRequestValues(&self) -> Retained<NSArray<NSURLQueryItem>>;
593
594        /// Setter for [`customLoginRequestValues`][Self::customLoginRequestValues].
595        ///
596        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
597        #[unsafe(method(setCustomLoginRequestValues:))]
598        #[unsafe(method_family = none)]
599        pub unsafe fn setCustomLoginRequestValues(
600            &self,
601            custom_login_request_values: &NSArray<NSURLQueryItem>,
602        );
603
604        /// Sets custom claims to be added to the login request header.
605        ///
606        /// Parameter `claims`: The claims to be added. It must serialize as valid JSON to be accepted.
607        ///
608        /// Parameter `error`: Nil or an NSError indicating why the claims were rejected.
609        ///
610        /// Returns: YES when successful and NO when claims are rejected.
611        ///
612        /// # Safety
613        ///
614        /// `claims` generic should be of the correct type.
615        #[unsafe(method(setCustomLoginRequestHeaderClaims:returningError:_))]
616        #[unsafe(method_family = none)]
617        pub unsafe fn setCustomLoginRequestHeaderClaims_returningError(
618            &self,
619            claims: &NSDictionary<NSString, AnyObject>,
620        ) -> Result<(), Retained<NSError>>;
621
622        /// Sets custom claims to be added to the login request body.
623        ///
624        /// Parameter `claims`: The claims to be added. It must serialize as valid JSON to be accepted.
625        ///
626        /// Parameter `error`: Nil or an NSError indicating why the claims were rejected.
627        ///
628        /// Returns: YES when successful and NO when claims are rejected.
629        ///
630        /// # Safety
631        ///
632        /// `claims` generic should be of the correct type.
633        #[unsafe(method(setCustomLoginRequestBodyClaims:returningError:_))]
634        #[unsafe(method_family = none)]
635        pub unsafe fn setCustomLoginRequestBodyClaims_returningError(
636            &self,
637            claims: &NSDictionary<NSString, AnyObject>,
638        ) -> Result<(), Retained<NSError>>;
639
640        /// The claim name for the user unique identifier in the id token. Defaults to "sub".
641        #[unsafe(method(uniqueIdentifierClaimName))]
642        #[unsafe(method_family = none)]
643        pub unsafe fn uniqueIdentifierClaimName(&self) -> Option<Retained<NSString>>;
644
645        /// Setter for [`uniqueIdentifierClaimName`][Self::uniqueIdentifierClaimName].
646        ///
647        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
648        #[unsafe(method(setUniqueIdentifierClaimName:))]
649        #[unsafe(method_family = none)]
650        pub unsafe fn setUniqueIdentifierClaimName(
651            &self,
652            unique_identifier_claim_name: Option<&NSString>,
653        );
654
655        /// The claim name for group membership request.
656        #[unsafe(method(groupRequestClaimName))]
657        #[unsafe(method_family = none)]
658        pub unsafe fn groupRequestClaimName(&self) -> Option<Retained<NSString>>;
659
660        /// Setter for [`groupRequestClaimName`][Self::groupRequestClaimName].
661        ///
662        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
663        #[unsafe(method(setGroupRequestClaimName:))]
664        #[unsafe(method_family = none)]
665        pub unsafe fn setGroupRequestClaimName(&self, group_request_claim_name: Option<&NSString>);
666
667        /// The claim name for group responses in the id_token.
668        #[unsafe(method(groupResponseClaimName))]
669        #[unsafe(method_family = none)]
670        pub unsafe fn groupResponseClaimName(&self) -> Option<Retained<NSString>>;
671
672        /// Setter for [`groupResponseClaimName`][Self::groupResponseClaimName].
673        ///
674        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
675        #[unsafe(method(setGroupResponseClaimName:))]
676        #[unsafe(method_family = none)]
677        pub unsafe fn setGroupResponseClaimName(
678            &self,
679            group_response_claim_name: Option<&NSString>,
680        );
681
682        /// The Kerberos ticket mappings to use.
683        #[unsafe(method(kerberosTicketMappings))]
684        #[unsafe(method_family = none)]
685        pub unsafe fn kerberosTicketMappings(
686            &self,
687        ) -> Retained<NSArray<ASAuthorizationProviderExtensionKerberosMapping>>;
688
689        /// Setter for [`kerberosTicketMappings`][Self::kerberosTicketMappings].
690        ///
691        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
692        #[unsafe(method(setKerberosTicketMappings:))]
693        #[unsafe(method_family = none)]
694        pub unsafe fn setKerberosTicketMappings(
695            &self,
696            kerberos_ticket_mappings: &NSArray<ASAuthorizationProviderExtensionKerberosMapping>,
697        );
698
699        /// Token Refresh Endpoint URL for login request.  Defaults to the tokenEndpointURL.
700        #[unsafe(method(refreshEndpointURL))]
701        #[unsafe(method_family = none)]
702        pub unsafe fn refreshEndpointURL(&self) -> Option<Retained<NSURL>>;
703
704        /// Setter for [`refreshEndpointURL`][Self::refreshEndpointURL].
705        ///
706        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
707        #[unsafe(method(setRefreshEndpointURL:))]
708        #[unsafe(method_family = none)]
709        pub unsafe fn setRefreshEndpointURL(&self, refresh_endpoint_url: Option<&NSURL>);
710
711        /// Custom values added to the refresh POST request body.
712        #[unsafe(method(customRefreshRequestValues))]
713        #[unsafe(method_family = none)]
714        pub unsafe fn customRefreshRequestValues(&self) -> Retained<NSArray<NSURLQueryItem>>;
715
716        /// Setter for [`customRefreshRequestValues`][Self::customRefreshRequestValues].
717        ///
718        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
719        #[unsafe(method(setCustomRefreshRequestValues:))]
720        #[unsafe(method_family = none)]
721        pub unsafe fn setCustomRefreshRequestValues(
722            &self,
723            custom_refresh_request_values: &NSArray<NSURLQueryItem>,
724        );
725
726        /// Sets custom claims to be added to the refresh request header.
727        ///
728        /// Parameter `claims`: The claims to be added. It must serialize as valid JSON to be accepted.
729        ///
730        /// Parameter `error`: Nil or an NSError indicating why the claims were rejected.
731        ///
732        /// Returns: YES when successful and NO when claims are rejected.
733        ///
734        /// # Safety
735        ///
736        /// `claims` generic should be of the correct type.
737        #[unsafe(method(setCustomRefreshRequestHeaderClaims:returningError:_))]
738        #[unsafe(method_family = none)]
739        pub unsafe fn setCustomRefreshRequestHeaderClaims_returningError(
740            &self,
741            claims: &NSDictionary<NSString, AnyObject>,
742        ) -> Result<(), Retained<NSError>>;
743
744        /// Sets custom claims to be added to the refresh request bode.
745        ///
746        /// Parameter `claims`: The claims to be added. It must serialize as valid JSON to be accepted.
747        ///
748        /// Parameter `error`: Nil or an NSError indicating why the claims were rejected.
749        ///
750        /// Returns: YES when successful and NO when claims are rejected.
751        ///
752        /// # Safety
753        ///
754        /// `claims` generic should be of the correct type.
755        #[unsafe(method(setCustomRefreshRequestBodyClaims:returningError:_))]
756        #[unsafe(method_family = none)]
757        pub unsafe fn setCustomRefreshRequestBodyClaims_returningError(
758            &self,
759            claims: &NSDictionary<NSString, AnyObject>,
760        ) -> Result<(), Retained<NSError>>;
761
762        /// The federation method to use.
763        #[unsafe(method(federationType))]
764        #[unsafe(method_family = none)]
765        pub unsafe fn federationType(&self) -> ASAuthorizationProviderExtensionFederationType;
766
767        /// Setter for [`federationType`][Self::federationType].
768        #[unsafe(method(setFederationType:))]
769        #[unsafe(method_family = none)]
770        pub unsafe fn setFederationType(
771            &self,
772            federation_type: ASAuthorizationProviderExtensionFederationType,
773        );
774
775        /// The URN to request when performing a federated login.
776        #[unsafe(method(federationRequestURN))]
777        #[unsafe(method_family = none)]
778        pub unsafe fn federationRequestURN(&self) -> Option<Retained<NSString>>;
779
780        /// Setter for [`federationRequestURN`][Self::federationRequestURN].
781        ///
782        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
783        #[unsafe(method(setFederationRequestURN:))]
784        #[unsafe(method_family = none)]
785        pub unsafe fn setFederationRequestURN(&self, federation_request_urn: Option<&NSString>);
786
787        /// The federation MEX URL to use.  This can be overwritten when using dynamic federation.
788        #[unsafe(method(federationMEXURL))]
789        #[unsafe(method_family = none)]
790        pub unsafe fn federationMEXURL(&self) -> Option<Retained<NSURL>>;
791
792        /// Setter for [`federationMEXURL`][Self::federationMEXURL].
793        ///
794        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
795        #[unsafe(method(setFederationMEXURL:))]
796        #[unsafe(method_family = none)]
797        pub unsafe fn setFederationMEXURL(&self, federation_mexurl: Option<&NSURL>);
798
799        /// The URL to use when performing dynamic federation.
800        #[unsafe(method(federationUserPreauthenticationURL))]
801        #[unsafe(method_family = none)]
802        pub unsafe fn federationUserPreauthenticationURL(&self) -> Option<Retained<NSURL>>;
803
804        /// Setter for [`federationUserPreauthenticationURL`][Self::federationUserPreauthenticationURL].
805        ///
806        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
807        #[unsafe(method(setFederationUserPreauthenticationURL:))]
808        #[unsafe(method_family = none)]
809        pub unsafe fn setFederationUserPreauthenticationURL(
810            &self,
811            federation_user_preauthentication_url: Option<&NSURL>,
812        );
813
814        /// The claim in the preauthentication response that contains the MEX URL.
815        #[unsafe(method(federationMEXURLKeypath))]
816        #[unsafe(method_family = none)]
817        pub unsafe fn federationMEXURLKeypath(&self) -> Option<Retained<NSString>>;
818
819        /// Setter for [`federationMEXURLKeypath`][Self::federationMEXURLKeypath].
820        ///
821        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
822        #[unsafe(method(setFederationMEXURLKeypath:))]
823        #[unsafe(method_family = none)]
824        pub unsafe fn setFederationMEXURLKeypath(
825            &self,
826            federation_mexurl_keypath: Option<&NSString>,
827        );
828
829        /// The predicate to apply to the preauthentication response to perform federation or not.
830        #[unsafe(method(federationPredicate))]
831        #[unsafe(method_family = none)]
832        pub unsafe fn federationPredicate(&self) -> Option<Retained<NSString>>;
833
834        /// Setter for [`federationPredicate`][Self::federationPredicate].
835        ///
836        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
837        #[unsafe(method(setFederationPredicate:))]
838        #[unsafe(method_family = none)]
839        pub unsafe fn setFederationPredicate(&self, federation_predicate: Option<&NSString>);
840
841        /// The custom query string values to add when making the preauthenticaion request.
842        #[unsafe(method(customFederationUserPreauthenticationRequestValues))]
843        #[unsafe(method_family = none)]
844        pub unsafe fn customFederationUserPreauthenticationRequestValues(
845            &self,
846        ) -> Retained<NSArray<NSURLQueryItem>>;
847
848        /// Setter for [`customFederationUserPreauthenticationRequestValues`][Self::customFederationUserPreauthenticationRequestValues].
849        ///
850        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
851        #[unsafe(method(setCustomFederationUserPreauthenticationRequestValues:))]
852        #[unsafe(method_family = none)]
853        pub unsafe fn setCustomFederationUserPreauthenticationRequestValues(
854            &self,
855            custom_federation_user_preauthentication_request_values: &NSArray<NSURLQueryItem>,
856        );
857
858        #[cfg(feature = "objc2-security")]
859        /// The public key to use for encrypting the embedded login assertion.
860        ///
861        /// Only applies to password authentication.  If set, the password will encrypted in an embedded assertion instead of the login request itself.
862        ///
863        /// # Safety
864        ///
865        /// This is not retained internally, you must ensure the object is still alive.
866        #[unsafe(method(loginRequestEncryptionPublicKey))]
867        #[unsafe(method_family = none)]
868        pub unsafe fn loginRequestEncryptionPublicKey(&self) -> Option<Retained<SecKey>>;
869
870        #[cfg(feature = "objc2-security")]
871        /// Setter for [`loginRequestEncryptionPublicKey`][Self::loginRequestEncryptionPublicKey].
872        ///
873        /// # Safety
874        ///
875        /// This is unretained, you must ensure the object is kept alive while in use.
876        #[unsafe(method(setLoginRequestEncryptionPublicKey:))]
877        #[unsafe(method_family = none)]
878        pub unsafe fn setLoginRequestEncryptionPublicKey(
879            &self,
880            login_request_encryption_public_key: Option<&SecKey>,
881        );
882
883        /// The APV prefix used for encrypted embedded login assertions.
884        #[unsafe(method(loginRequestEncryptionAPVPrefix))]
885        #[unsafe(method_family = none)]
886        pub unsafe fn loginRequestEncryptionAPVPrefix(&self) -> Option<Retained<NSData>>;
887
888        /// Setter for [`loginRequestEncryptionAPVPrefix`][Self::loginRequestEncryptionAPVPrefix].
889        ///
890        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
891        #[unsafe(method(setLoginRequestEncryptionAPVPrefix:))]
892        #[unsafe(method_family = none)]
893        pub unsafe fn setLoginRequestEncryptionAPVPrefix(
894            &self,
895            login_request_encryption_apv_prefix: Option<&NSData>,
896        );
897
898        /// The encryption algorithm to use for the embedded login assertion.
899        #[unsafe(method(loginRequestEncryptionAlgorithm))]
900        #[unsafe(method_family = none)]
901        pub unsafe fn loginRequestEncryptionAlgorithm(
902            &self,
903        ) -> Retained<ASAuthorizationProviderExtensionEncryptionAlgorithm>;
904
905        /// Setter for [`loginRequestEncryptionAlgorithm`][Self::loginRequestEncryptionAlgorithm].
906        ///
907        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
908        #[unsafe(method(setLoginRequestEncryptionAlgorithm:))]
909        #[unsafe(method_family = none)]
910        pub unsafe fn setLoginRequestEncryptionAlgorithm(
911            &self,
912            login_request_encryption_algorithm: &ASAuthorizationProviderExtensionEncryptionAlgorithm,
913        );
914
915        /// The PreSharedKey to be used for HKPE for embedded login assertions. Setting this value will change the mode to PSK if the loginRequestHPKEPreSharedKeyID is also set. Must be at least 32 bytes.
916        #[unsafe(method(loginRequestHPKEPreSharedKey))]
917        #[unsafe(method_family = none)]
918        pub unsafe fn loginRequestHPKEPreSharedKey(&self) -> Option<Retained<NSData>>;
919
920        /// Setter for [`loginRequestHPKEPreSharedKey`][Self::loginRequestHPKEPreSharedKey].
921        ///
922        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
923        #[unsafe(method(setLoginRequestHPKEPreSharedKey:))]
924        #[unsafe(method_family = none)]
925        pub unsafe fn setLoginRequestHPKEPreSharedKey(
926            &self,
927            login_request_hpke_pre_shared_key: Option<&NSData>,
928        );
929
930        /// The PreSharedKey Id to be used for HPKE PSK for embedded login assertions.  This is required if the loginRequestHPKEPreSharedKey is set.
931        #[unsafe(method(loginRequestHPKEPreSharedKeyID))]
932        #[unsafe(method_family = none)]
933        pub unsafe fn loginRequestHPKEPreSharedKeyID(&self) -> Option<Retained<NSData>>;
934
935        /// Setter for [`loginRequestHPKEPreSharedKeyID`][Self::loginRequestHPKEPreSharedKeyID].
936        ///
937        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
938        #[unsafe(method(setLoginRequestHPKEPreSharedKeyID:))]
939        #[unsafe(method_family = none)]
940        pub unsafe fn setLoginRequestHPKEPreSharedKeyID(
941            &self,
942            login_request_hpke_pre_shared_key_id: Option<&NSData>,
943        );
944
945        /// The url endpoint for key service, defaults to token tokenEndpointURL.
946        #[unsafe(method(keyEndpointURL))]
947        #[unsafe(method_family = none)]
948        pub unsafe fn keyEndpointURL(&self) -> Option<Retained<NSURL>>;
949
950        /// Setter for [`keyEndpointURL`][Self::keyEndpointURL].
951        ///
952        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
953        #[unsafe(method(setKeyEndpointURL:))]
954        #[unsafe(method_family = none)]
955        pub unsafe fn setKeyEndpointURL(&self, key_endpoint_url: Option<&NSURL>);
956
957        /// Custom values added to the key exchange POST request body.
958        #[unsafe(method(customKeyExchangeRequestValues))]
959        #[unsafe(method_family = none)]
960        pub unsafe fn customKeyExchangeRequestValues(&self) -> Retained<NSArray<NSURLQueryItem>>;
961
962        /// Setter for [`customKeyExchangeRequestValues`][Self::customKeyExchangeRequestValues].
963        ///
964        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
965        #[unsafe(method(setCustomKeyExchangeRequestValues:))]
966        #[unsafe(method_family = none)]
967        pub unsafe fn setCustomKeyExchangeRequestValues(
968            &self,
969            custom_key_exchange_request_values: &NSArray<NSURLQueryItem>,
970        );
971
972        /// Sets custom claims to be added to the key exchange request header.
973        ///
974        /// Parameter `claims`: The claims to be added. It must serialize as valid JSON to be accepted.
975        ///
976        /// Parameter `error`: Nil or an NSError indicating why the claims were rejected.
977        ///
978        /// Returns: YES when successful and NO when claims are rejected.
979        ///
980        /// # Safety
981        ///
982        /// `claims` generic should be of the correct type.
983        #[unsafe(method(setCustomKeyExchangeRequestHeaderClaims:returningError:_))]
984        #[unsafe(method_family = none)]
985        pub unsafe fn setCustomKeyExchangeRequestHeaderClaims_returningError(
986            &self,
987            claims: &NSDictionary<NSString, AnyObject>,
988        ) -> Result<(), Retained<NSError>>;
989
990        /// Sets custom claims to be added to the key exchange request body.
991        ///
992        /// Parameter `claims`: The claims to be added. It must serialize as valid JSON to be accepted.
993        ///
994        /// Parameter `error`: Nil or an NSError indicating why the claims were rejected.
995        ///
996        /// Returns: YES when successful and NO when claims are rejected.
997        ///
998        /// # Safety
999        ///
1000        /// `claims` generic should be of the correct type.
1001        #[unsafe(method(setCustomKeyExchangeRequestBodyClaims:returningError:_))]
1002        #[unsafe(method_family = none)]
1003        pub unsafe fn setCustomKeyExchangeRequestBodyClaims_returningError(
1004            &self,
1005            claims: &NSDictionary<NSString, AnyObject>,
1006        ) -> Result<(), Retained<NSError>>;
1007
1008        /// Custom values added to the key request POST request body.
1009        #[unsafe(method(customKeyRequestValues))]
1010        #[unsafe(method_family = none)]
1011        pub unsafe fn customKeyRequestValues(&self) -> Retained<NSArray<NSURLQueryItem>>;
1012
1013        /// Setter for [`customKeyRequestValues`][Self::customKeyRequestValues].
1014        ///
1015        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
1016        #[unsafe(method(setCustomKeyRequestValues:))]
1017        #[unsafe(method_family = none)]
1018        pub unsafe fn setCustomKeyRequestValues(
1019            &self,
1020            custom_key_request_values: &NSArray<NSURLQueryItem>,
1021        );
1022
1023        /// Sets custom claims to be added to the key request header.
1024        ///
1025        /// Parameter `claims`: The claims to be added. It must serialize as valid JSON to be accepted.
1026        ///
1027        /// Parameter `error`: Nil or an NSError indicating why the claims were rejected.
1028        ///
1029        /// Returns: YES when successful and NO when claims are rejected.
1030        ///
1031        /// # Safety
1032        ///
1033        /// `claims` generic should be of the correct type.
1034        #[unsafe(method(setCustomKeyRequestHeaderClaims:returningError:_))]
1035        #[unsafe(method_family = none)]
1036        pub unsafe fn setCustomKeyRequestHeaderClaims_returningError(
1037            &self,
1038            claims: &NSDictionary<NSString, AnyObject>,
1039        ) -> Result<(), Retained<NSError>>;
1040
1041        /// Sets custom claims to be added to the key request body.
1042        ///
1043        /// Parameter `claims`: The claims to be added. It must serialize as valid JSON to be accepted.
1044        ///
1045        /// Parameter `error`: Nil or an NSError indicating why the claims were rejected.
1046        ///
1047        /// Returns: YES when successful and NO when claims are rejected.
1048        ///
1049        /// # Safety
1050        ///
1051        /// `claims` generic should be of the correct type.
1052        #[unsafe(method(setCustomKeyRequestBodyClaims:returningError:_))]
1053        #[unsafe(method_family = none)]
1054        pub unsafe fn setCustomKeyRequestBodyClaims_returningError(
1055            &self,
1056            claims: &NSDictionary<NSString, AnyObject>,
1057        ) -> Result<(), Retained<NSError>>;
1058
1059        /// The PreSharedKey to be used for HKPE. Setting this value will change the mode to PSK or AuthPSK if the hpkeAuthPublicKey is also set. Must be at least 32 bytes.
1060        #[unsafe(method(hpkePreSharedKey))]
1061        #[unsafe(method_family = none)]
1062        pub unsafe fn hpkePreSharedKey(&self) -> Option<Retained<NSData>>;
1063
1064        /// Setter for [`hpkePreSharedKey`][Self::hpkePreSharedKey].
1065        ///
1066        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
1067        #[unsafe(method(setHpkePreSharedKey:))]
1068        #[unsafe(method_family = none)]
1069        pub unsafe fn setHpkePreSharedKey(&self, hpke_pre_shared_key: Option<&NSData>);
1070
1071        /// The PreSharedKey Id to be used for HPKE PSK or AuthPSK mode.  This is requred if the hpkePreSharedKey is set.
1072        #[unsafe(method(hpkePreSharedKeyID))]
1073        #[unsafe(method_family = none)]
1074        pub unsafe fn hpkePreSharedKeyID(&self) -> Option<Retained<NSData>>;
1075
1076        /// Setter for [`hpkePreSharedKeyID`][Self::hpkePreSharedKeyID].
1077        ///
1078        /// This is [copied][objc2_foundation::NSCopying::copy] when set.
1079        #[unsafe(method(setHpkePreSharedKeyID:))]
1080        #[unsafe(method_family = none)]
1081        pub unsafe fn setHpkePreSharedKeyID(&self, hpke_pre_shared_key_id: Option<&NSData>);
1082
1083        #[cfg(feature = "objc2-security")]
1084        /// The Authentication public key to be used for HPKE.  Setting this value with changet the mode to Auth or AuthPSK if the hpkePreSharedKey is also set.  This public key is used to authenticate HPKE responses.
1085        #[unsafe(method(hpkeAuthPublicKey))]
1086        #[unsafe(method_family = none)]
1087        pub unsafe fn hpkeAuthPublicKey(&self) -> Option<Retained<SecKey>>;
1088
1089        #[cfg(feature = "objc2-security")]
1090        /// Setter for [`hpkeAuthPublicKey`][Self::hpkeAuthPublicKey].
1091        #[unsafe(method(setHpkeAuthPublicKey:))]
1092        #[unsafe(method_family = none)]
1093        pub unsafe fn setHpkeAuthPublicKey(&self, hpke_auth_public_key: Option<&SecKey>);
1094    );
1095}