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