objc2_authentication_services/generated/
ASAuthorizationPublicKeyCredentialConstants.rs

1//! This file has been automatically generated by `objc2`'s `header-translator`.
2//! DO NOT EDIT
3use objc2::__framework_prelude::*;
4use objc2_foundation::*;
5
6use crate::*;
7
8/// A string indicating a preference for whether the authenticator should attempt to verify the user, such as through a PIN or biometrics.
9///
10/// See also [Apple's documentation](https://developer.apple.com/documentation/authenticationservices/asauthorizationpublickeycredentialuserverificationpreference?language=objc)
11// NS_TYPED_EXTENSIBLE_ENUM
12pub type ASAuthorizationPublicKeyCredentialUserVerificationPreference = NSString;
13
14extern "C" {
15    /// Indicates that the authenticator should try to verify the user if possible, but authentication should proceed even if user verification is not currently available.
16    ///
17    /// See also [Apple's documentation](https://developer.apple.com/documentation/authenticationservices/asauthorizationpublickeycredentialuserverificationpreferencepreferred?language=objc)
18    pub static ASAuthorizationPublicKeyCredentialUserVerificationPreferencePreferred:
19        Option<&'static ASAuthorizationPublicKeyCredentialUserVerificationPreference>;
20}
21
22extern "C" {
23    /// Indicates that the authenticator must attempt to verify the user. If the authenticator is not currently capable of verifying the user, authentication will fail.
24    ///
25    /// See also [Apple's documentation](https://developer.apple.com/documentation/authenticationservices/asauthorizationpublickeycredentialuserverificationpreferencerequired?language=objc)
26    pub static ASAuthorizationPublicKeyCredentialUserVerificationPreferenceRequired:
27        Option<&'static ASAuthorizationPublicKeyCredentialUserVerificationPreference>;
28}
29
30extern "C" {
31    /// Indicates that the authenticator should prefer _not_ verifying the user, if possible. This may be used to streamline an authentication process where the user has already been verified.
32    ///
33    /// See also [Apple's documentation](https://developer.apple.com/documentation/authenticationservices/asauthorizationpublickeycredentialuserverificationpreferencediscouraged?language=objc)
34    pub static ASAuthorizationPublicKeyCredentialUserVerificationPreferenceDiscouraged:
35        Option<&'static ASAuthorizationPublicKeyCredentialUserVerificationPreference>;
36}
37
38/// A string indicating the type of attestation the authenticator should attempt to perform.
39///
40/// See also [Apple's documentation](https://developer.apple.com/documentation/authenticationservices/asauthorizationpublickeycredentialattestationkind?language=objc)
41// NS_TYPED_EXTENSIBLE_ENUM
42pub type ASAuthorizationPublicKeyCredentialAttestationKind = NSString;
43
44extern "C" {
45    /// Indicates that the authenticator should not perform attestation.
46    ///
47    /// See also [Apple's documentation](https://developer.apple.com/documentation/authenticationservices/asauthorizationpublickeycredentialattestationkindnone?language=objc)
48    pub static ASAuthorizationPublicKeyCredentialAttestationKindNone:
49        Option<&'static ASAuthorizationPublicKeyCredentialAttestationKind>;
50}
51
52extern "C" {
53    /// Indicates that the authenticator should perform attestation itself.
54    ///
55    /// See also [Apple's documentation](https://developer.apple.com/documentation/authenticationservices/asauthorizationpublickeycredentialattestationkinddirect?language=objc)
56    pub static ASAuthorizationPublicKeyCredentialAttestationKindDirect:
57        Option<&'static ASAuthorizationPublicKeyCredentialAttestationKind>;
58}
59
60extern "C" {
61    /// Indicates that the authenticator may use an external service to perform attestation.
62    ///
63    /// See also [Apple's documentation](https://developer.apple.com/documentation/authenticationservices/asauthorizationpublickeycredentialattestationkindindirect?language=objc)
64    pub static ASAuthorizationPublicKeyCredentialAttestationKindIndirect:
65        Option<&'static ASAuthorizationPublicKeyCredentialAttestationKind>;
66}
67
68extern "C" {
69    /// Indicates that the authenticator should perform an attestation which may include information that uniquely identifies that authenticator. Authenticators should only allow enterprise attestation if they have been previously enrolled in enterprise management, and should restrict it to managed Relying Parties.
70    ///
71    /// See also [Apple's documentation](https://developer.apple.com/documentation/authenticationservices/asauthorizationpublickeycredentialattestationkindenterprise?language=objc)
72    pub static ASAuthorizationPublicKeyCredentialAttestationKindEnterprise:
73        Option<&'static ASAuthorizationPublicKeyCredentialAttestationKind>;
74}
75
76/// A string used to indicate a preference for whether the authenticator should itself store the private key for a credential.
77///
78/// See also [Apple's documentation](https://developer.apple.com/documentation/authenticationservices/asauthorizationpublickeycredentialresidentkeypreference?language=objc)
79// NS_TYPED_EXTENSIBLE_ENUM
80pub type ASAuthorizationPublicKeyCredentialResidentKeyPreference = NSString;
81
82extern "C" {
83    /// Indicates that the authenticator should not store the private key, if possible.
84    ///
85    /// See also [Apple's documentation](https://developer.apple.com/documentation/authenticationservices/asauthorizationpublickeycredentialresidentkeypreferencediscouraged?language=objc)
86    pub static ASAuthorizationPublicKeyCredentialResidentKeyPreferenceDiscouraged:
87        Option<&'static ASAuthorizationPublicKeyCredentialResidentKeyPreference>;
88}
89
90extern "C" {
91    /// Indicates that the authenticator should store the private key, if possible.
92    ///
93    /// See also [Apple's documentation](https://developer.apple.com/documentation/authenticationservices/asauthorizationpublickeycredentialresidentkeypreferencepreferred?language=objc)
94    pub static ASAuthorizationPublicKeyCredentialResidentKeyPreferencePreferred:
95        Option<&'static ASAuthorizationPublicKeyCredentialResidentKeyPreference>;
96}
97
98extern "C" {
99    /// Indicates that the authenticator must store the private key, and that key creation should fail if the authenticator is not currently capable of storing the key.
100    ///
101    /// See also [Apple's documentation](https://developer.apple.com/documentation/authenticationservices/asauthorizationpublickeycredentialresidentkeypreferencerequired?language=objc)
102    pub static ASAuthorizationPublicKeyCredentialResidentKeyPreferenceRequired:
103        Option<&'static ASAuthorizationPublicKeyCredentialResidentKeyPreference>;
104}
105
106/// [Apple's documentation](https://developer.apple.com/documentation/authenticationservices/asauthorizationpublickeycredentialattachment?language=objc)
107// NS_ENUM
108#[repr(transparent)]
109#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
110pub struct ASAuthorizationPublicKeyCredentialAttachment(pub NSInteger);
111impl ASAuthorizationPublicKeyCredentialAttachment {
112    #[doc(alias = "ASAuthorizationPublicKeyCredentialAttachmentPlatform")]
113    pub const Platform: Self = Self(0);
114    #[doc(alias = "ASAuthorizationPublicKeyCredentialAttachmentCrossPlatform")]
115    pub const CrossPlatform: Self = Self(1);
116}
117
118unsafe impl Encode for ASAuthorizationPublicKeyCredentialAttachment {
119    const ENCODING: Encoding = NSInteger::ENCODING;
120}
121
122unsafe impl RefEncode for ASAuthorizationPublicKeyCredentialAttachment {
123    const ENCODING_REF: Encoding = Encoding::Pointer(&Self::ENCODING);
124}