-
-
Notifications
You must be signed in to change notification settings - Fork 23
/
model_accept_login_request.go
330 lines (279 loc) · 10.4 KB
/
model_accept_login_request.go
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
/*
* Ory Hydra API
*
* Documentation for all of Ory Hydra's APIs.
*
* API version: v1.11.8
* Contact: hi@ory.sh
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package client
import (
"encoding/json"
)
// AcceptLoginRequest struct for AcceptLoginRequest
type AcceptLoginRequest struct {
// ACR sets the Authentication AuthorizationContext Class Reference value for this authentication session. You can use it to express that, for example, a user authenticated using two factor authentication.
Acr *string `json:"acr,omitempty"`
Amr []string `json:"amr,omitempty"`
Context map[string]interface{} `json:"context,omitempty"`
// ForceSubjectIdentifier forces the \"pairwise\" user ID of the end-user that authenticated. The \"pairwise\" user ID refers to the (Pairwise Identifier Algorithm)[http://openid.net/specs/openid-connect-core-1_0.html#PairwiseAlg] of the OpenID Connect specification. It allows you to set an obfuscated subject (\"user\") identifier that is unique to the client. Please note that this changes the user ID on endpoint /userinfo and sub claim of the ID Token. It does not change the sub claim in the OAuth 2.0 Introspection. Per default, ORY Hydra handles this value with its own algorithm. In case you want to set this yourself you can use this field. Please note that setting this field has no effect if `pairwise` is not configured in ORY Hydra or the OAuth 2.0 Client does not expect a pairwise identifier (set via `subject_type` key in the client's configuration). Please also be aware that ORY Hydra is unable to properly compute this value during authentication. This implies that you have to compute this value on every authentication process (probably depending on the client ID or some other unique value). If you fail to compute the proper value, then authentication processes which have id_token_hint set might fail.
ForceSubjectIdentifier *string `json:"force_subject_identifier,omitempty"`
// Remember, if set to true, tells ORY Hydra to remember this user by telling the user agent (browser) to store a cookie with authentication data. If the same user performs another OAuth 2.0 Authorization Request, he/she will not be asked to log in again.
Remember *bool `json:"remember,omitempty"`
// RememberFor sets how long the authentication should be remembered for in seconds. If set to `0`, the authorization will be remembered for the duration of the browser session (using a session cookie).
RememberFor *int64 `json:"remember_for,omitempty"`
// Subject is the user ID of the end-user that authenticated.
Subject string `json:"subject"`
}
// NewAcceptLoginRequest instantiates a new AcceptLoginRequest object
// This constructor will assign default values to properties that have it defined,
// and makes sure properties required by API are set, but the set of arguments
// will change when the set of required properties is changed
func NewAcceptLoginRequest(subject string) *AcceptLoginRequest {
this := AcceptLoginRequest{}
this.Subject = subject
return &this
}
// NewAcceptLoginRequestWithDefaults instantiates a new AcceptLoginRequest object
// This constructor will only assign default values to properties that have it defined,
// but it doesn't guarantee that properties required by API are set
func NewAcceptLoginRequestWithDefaults() *AcceptLoginRequest {
this := AcceptLoginRequest{}
return &this
}
// GetAcr returns the Acr field value if set, zero value otherwise.
func (o *AcceptLoginRequest) GetAcr() string {
if o == nil || o.Acr == nil {
var ret string
return ret
}
return *o.Acr
}
// GetAcrOk returns a tuple with the Acr field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AcceptLoginRequest) GetAcrOk() (*string, bool) {
if o == nil || o.Acr == nil {
return nil, false
}
return o.Acr, true
}
// HasAcr returns a boolean if a field has been set.
func (o *AcceptLoginRequest) HasAcr() bool {
if o != nil && o.Acr != nil {
return true
}
return false
}
// SetAcr gets a reference to the given string and assigns it to the Acr field.
func (o *AcceptLoginRequest) SetAcr(v string) {
o.Acr = &v
}
// GetAmr returns the Amr field value if set, zero value otherwise.
func (o *AcceptLoginRequest) GetAmr() []string {
if o == nil || o.Amr == nil {
var ret []string
return ret
}
return o.Amr
}
// GetAmrOk returns a tuple with the Amr field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AcceptLoginRequest) GetAmrOk() ([]string, bool) {
if o == nil || o.Amr == nil {
return nil, false
}
return o.Amr, true
}
// HasAmr returns a boolean if a field has been set.
func (o *AcceptLoginRequest) HasAmr() bool {
if o != nil && o.Amr != nil {
return true
}
return false
}
// SetAmr gets a reference to the given []string and assigns it to the Amr field.
func (o *AcceptLoginRequest) SetAmr(v []string) {
o.Amr = v
}
// GetContext returns the Context field value if set, zero value otherwise.
func (o *AcceptLoginRequest) GetContext() map[string]interface{} {
if o == nil || o.Context == nil {
var ret map[string]interface{}
return ret
}
return o.Context
}
// GetContextOk returns a tuple with the Context field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AcceptLoginRequest) GetContextOk() (map[string]interface{}, bool) {
if o == nil || o.Context == nil {
return nil, false
}
return o.Context, true
}
// HasContext returns a boolean if a field has been set.
func (o *AcceptLoginRequest) HasContext() bool {
if o != nil && o.Context != nil {
return true
}
return false
}
// SetContext gets a reference to the given map[string]interface{} and assigns it to the Context field.
func (o *AcceptLoginRequest) SetContext(v map[string]interface{}) {
o.Context = v
}
// GetForceSubjectIdentifier returns the ForceSubjectIdentifier field value if set, zero value otherwise.
func (o *AcceptLoginRequest) GetForceSubjectIdentifier() string {
if o == nil || o.ForceSubjectIdentifier == nil {
var ret string
return ret
}
return *o.ForceSubjectIdentifier
}
// GetForceSubjectIdentifierOk returns a tuple with the ForceSubjectIdentifier field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AcceptLoginRequest) GetForceSubjectIdentifierOk() (*string, bool) {
if o == nil || o.ForceSubjectIdentifier == nil {
return nil, false
}
return o.ForceSubjectIdentifier, true
}
// HasForceSubjectIdentifier returns a boolean if a field has been set.
func (o *AcceptLoginRequest) HasForceSubjectIdentifier() bool {
if o != nil && o.ForceSubjectIdentifier != nil {
return true
}
return false
}
// SetForceSubjectIdentifier gets a reference to the given string and assigns it to the ForceSubjectIdentifier field.
func (o *AcceptLoginRequest) SetForceSubjectIdentifier(v string) {
o.ForceSubjectIdentifier = &v
}
// GetRemember returns the Remember field value if set, zero value otherwise.
func (o *AcceptLoginRequest) GetRemember() bool {
if o == nil || o.Remember == nil {
var ret bool
return ret
}
return *o.Remember
}
// GetRememberOk returns a tuple with the Remember field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AcceptLoginRequest) GetRememberOk() (*bool, bool) {
if o == nil || o.Remember == nil {
return nil, false
}
return o.Remember, true
}
// HasRemember returns a boolean if a field has been set.
func (o *AcceptLoginRequest) HasRemember() bool {
if o != nil && o.Remember != nil {
return true
}
return false
}
// SetRemember gets a reference to the given bool and assigns it to the Remember field.
func (o *AcceptLoginRequest) SetRemember(v bool) {
o.Remember = &v
}
// GetRememberFor returns the RememberFor field value if set, zero value otherwise.
func (o *AcceptLoginRequest) GetRememberFor() int64 {
if o == nil || o.RememberFor == nil {
var ret int64
return ret
}
return *o.RememberFor
}
// GetRememberForOk returns a tuple with the RememberFor field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *AcceptLoginRequest) GetRememberForOk() (*int64, bool) {
if o == nil || o.RememberFor == nil {
return nil, false
}
return o.RememberFor, true
}
// HasRememberFor returns a boolean if a field has been set.
func (o *AcceptLoginRequest) HasRememberFor() bool {
if o != nil && o.RememberFor != nil {
return true
}
return false
}
// SetRememberFor gets a reference to the given int64 and assigns it to the RememberFor field.
func (o *AcceptLoginRequest) SetRememberFor(v int64) {
o.RememberFor = &v
}
// GetSubject returns the Subject field value
func (o *AcceptLoginRequest) GetSubject() string {
if o == nil {
var ret string
return ret
}
return o.Subject
}
// GetSubjectOk returns a tuple with the Subject field value
// and a boolean to check if the value has been set.
func (o *AcceptLoginRequest) GetSubjectOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Subject, true
}
// SetSubject sets field value
func (o *AcceptLoginRequest) SetSubject(v string) {
o.Subject = v
}
func (o AcceptLoginRequest) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.Acr != nil {
toSerialize["acr"] = o.Acr
}
if o.Amr != nil {
toSerialize["amr"] = o.Amr
}
if o.Context != nil {
toSerialize["context"] = o.Context
}
if o.ForceSubjectIdentifier != nil {
toSerialize["force_subject_identifier"] = o.ForceSubjectIdentifier
}
if o.Remember != nil {
toSerialize["remember"] = o.Remember
}
if o.RememberFor != nil {
toSerialize["remember_for"] = o.RememberFor
}
if true {
toSerialize["subject"] = o.Subject
}
return json.Marshal(toSerialize)
}
type NullableAcceptLoginRequest struct {
value *AcceptLoginRequest
isSet bool
}
func (v NullableAcceptLoginRequest) Get() *AcceptLoginRequest {
return v.value
}
func (v *NullableAcceptLoginRequest) Set(val *AcceptLoginRequest) {
v.value = val
v.isSet = true
}
func (v NullableAcceptLoginRequest) IsSet() bool {
return v.isSet
}
func (v *NullableAcceptLoginRequest) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableAcceptLoginRequest(val *AcceptLoginRequest) *NullableAcceptLoginRequest {
return &NullableAcceptLoginRequest{value: val, isSet: true}
}
func (v NullableAcceptLoginRequest) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableAcceptLoginRequest) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}