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
//! This file has been automatically generated by `objc2`'s `header-translator`.
//! DO NOT EDIT
use core::ffi::*;
use core::ptr::NonNull;
use objc2::__framework_prelude::*;
use objc2_foundation::*;
use crate::*;
extern_class!(
/// [Apple's documentation](https://developer.apple.com/documentation/authenticationservices/asauthorizationproviderextensionuserloginconfiguration?language=objc)
#[unsafe(super(NSObject))]
#[derive(Debug, PartialEq, Eq, Hash)]
pub struct ASAuthorizationProviderExtensionUserLoginConfiguration;
);
extern_conformance!(
unsafe impl NSObjectProtocol for ASAuthorizationProviderExtensionUserLoginConfiguration {}
);
impl ASAuthorizationProviderExtensionUserLoginConfiguration {
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>;
/// The user name to use when authenticating with the identity provider.
#[unsafe(method(loginUserName))]
#[unsafe(method_family = none)]
pub unsafe fn loginUserName(&self) -> Retained<NSString>;
/// Setter for [`loginUserName`][Self::loginUserName].
///
/// This is [copied][objc2_foundation::NSCopying::copy] when set.
#[unsafe(method(setLoginUserName:))]
#[unsafe(method_family = none)]
pub unsafe fn setLoginUserName(&self, login_user_name: &NSString);
/// Creates an instance with the required values.
///
/// Parameter `loginUserName`: The login user name to use.
#[unsafe(method(initWithLoginUserName:))]
#[unsafe(method_family = init)]
pub unsafe fn initWithLoginUserName(
this: Allocated<Self>,
login_user_name: &NSString,
) -> Retained<Self>;
/// 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>>;
/// 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>>;
);
}