-
Notifications
You must be signed in to change notification settings - Fork 1
/
model_backchannel_authentication_complete_request.go
618 lines (525 loc) · 19.2 KB
/
model_backchannel_authentication_complete_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
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
/*
Authlete API
Authlete API Document.
API version: 2.3.12
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package authlete
import (
"encoding/json"
)
// checks if the BackchannelAuthenticationCompleteRequest type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &BackchannelAuthenticationCompleteRequest{}
// BackchannelAuthenticationCompleteRequest struct for BackchannelAuthenticationCompleteRequest
type BackchannelAuthenticationCompleteRequest struct {
// The ticket issued by Authlete's `/backchannel/authentication` API.
Ticket string `json:"ticket"`
// The result of the end-user authentication and authorization. One of the following. Details are described in the description.
Result string `json:"result"`
// The subject (= unique identifier) of the end-user.
Subject string `json:"subject"`
// The value of the sub claim that should be used in the ID token.
Sub *string `json:"sub,omitempty"`
// The time at which the end-user was authenticated. Its value is the number of seconds from `1970-01-01`.
AuthTime *int64 `json:"authTime,omitempty"`
// The reference of the authentication context class which the end-user authentication satisfied.
Acr *string `json:"acr,omitempty"`
// Additional claims which will be embedded in the ID token.
Claims *string `json:"claims,omitempty"`
// The extra properties associated with the access token.
Properties []Property `json:"properties,omitempty"`
// Scopes to replace the scopes specified in the original backchannel authentication request with. When nothing is specified for this parameter, replacement is not performed.
Scopes []string `json:"scopes,omitempty"`
// JSON that represents additional JWS header parameters for ID tokens.
IdtHeaderParams *string `json:"idtHeaderParams,omitempty"`
// The description of the error. If this optional request parameter is given, its value is used as the value of the `error_description` property, but it is used only when the result is not `AUTHORIZED`. To comply with the specification strictly, the description must not include characters outside the set `%x20-21 / %x23-5B / %x5D-7E`.
ErrorDescription *string `json:"errorDescription,omitempty"`
// The URI of a document which describes the error in detail. This corresponds to the `error_uri` property in the response to the client.
ErrorUri *string `json:"errorUri,omitempty"`
// the claims that the user has consented for the client application to know.
ConsentedClaims []string `json:"consentedClaims,omitempty"`
// Additional claims that are added to the payload part of the JWT access token.
JwtAtClaims *string `json:"jwtAtClaims,omitempty"`
// The representation of an access token that may be issued as a result of the Authlete API call.
AccessToken *string `json:"accessToken,omitempty"`
}
// NewBackchannelAuthenticationCompleteRequest instantiates a new BackchannelAuthenticationCompleteRequest 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 NewBackchannelAuthenticationCompleteRequest(ticket string, result string, subject string) *BackchannelAuthenticationCompleteRequest {
this := BackchannelAuthenticationCompleteRequest{}
this.Ticket = ticket
this.Result = result
this.Subject = subject
return &this
}
// NewBackchannelAuthenticationCompleteRequestWithDefaults instantiates a new BackchannelAuthenticationCompleteRequest 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 NewBackchannelAuthenticationCompleteRequestWithDefaults() *BackchannelAuthenticationCompleteRequest {
this := BackchannelAuthenticationCompleteRequest{}
return &this
}
// GetTicket returns the Ticket field value
func (o *BackchannelAuthenticationCompleteRequest) GetTicket() string {
if o == nil {
var ret string
return ret
}
return o.Ticket
}
// GetTicketOk returns a tuple with the Ticket field value
// and a boolean to check if the value has been set.
func (o *BackchannelAuthenticationCompleteRequest) GetTicketOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Ticket, true
}
// SetTicket sets field value
func (o *BackchannelAuthenticationCompleteRequest) SetTicket(v string) {
o.Ticket = v
}
// GetResult returns the Result field value
func (o *BackchannelAuthenticationCompleteRequest) GetResult() string {
if o == nil {
var ret string
return ret
}
return o.Result
}
// GetResultOk returns a tuple with the Result field value
// and a boolean to check if the value has been set.
func (o *BackchannelAuthenticationCompleteRequest) GetResultOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Result, true
}
// SetResult sets field value
func (o *BackchannelAuthenticationCompleteRequest) SetResult(v string) {
o.Result = v
}
// GetSubject returns the Subject field value
func (o *BackchannelAuthenticationCompleteRequest) 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 *BackchannelAuthenticationCompleteRequest) GetSubjectOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Subject, true
}
// SetSubject sets field value
func (o *BackchannelAuthenticationCompleteRequest) SetSubject(v string) {
o.Subject = v
}
// GetSub returns the Sub field value if set, zero value otherwise.
func (o *BackchannelAuthenticationCompleteRequest) GetSub() string {
if o == nil || isNil(o.Sub) {
var ret string
return ret
}
return *o.Sub
}
// GetSubOk returns a tuple with the Sub field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BackchannelAuthenticationCompleteRequest) GetSubOk() (*string, bool) {
if o == nil || isNil(o.Sub) {
return nil, false
}
return o.Sub, true
}
// HasSub returns a boolean if a field has been set.
func (o *BackchannelAuthenticationCompleteRequest) HasSub() bool {
if o != nil && !isNil(o.Sub) {
return true
}
return false
}
// SetSub gets a reference to the given string and assigns it to the Sub field.
func (o *BackchannelAuthenticationCompleteRequest) SetSub(v string) {
o.Sub = &v
}
// GetAuthTime returns the AuthTime field value if set, zero value otherwise.
func (o *BackchannelAuthenticationCompleteRequest) GetAuthTime() int64 {
if o == nil || isNil(o.AuthTime) {
var ret int64
return ret
}
return *o.AuthTime
}
// GetAuthTimeOk returns a tuple with the AuthTime field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BackchannelAuthenticationCompleteRequest) GetAuthTimeOk() (*int64, bool) {
if o == nil || isNil(o.AuthTime) {
return nil, false
}
return o.AuthTime, true
}
// HasAuthTime returns a boolean if a field has been set.
func (o *BackchannelAuthenticationCompleteRequest) HasAuthTime() bool {
if o != nil && !isNil(o.AuthTime) {
return true
}
return false
}
// SetAuthTime gets a reference to the given int64 and assigns it to the AuthTime field.
func (o *BackchannelAuthenticationCompleteRequest) SetAuthTime(v int64) {
o.AuthTime = &v
}
// GetAcr returns the Acr field value if set, zero value otherwise.
func (o *BackchannelAuthenticationCompleteRequest) GetAcr() string {
if o == nil || isNil(o.Acr) {
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 *BackchannelAuthenticationCompleteRequest) GetAcrOk() (*string, bool) {
if o == nil || isNil(o.Acr) {
return nil, false
}
return o.Acr, true
}
// HasAcr returns a boolean if a field has been set.
func (o *BackchannelAuthenticationCompleteRequest) HasAcr() bool {
if o != nil && !isNil(o.Acr) {
return true
}
return false
}
// SetAcr gets a reference to the given string and assigns it to the Acr field.
func (o *BackchannelAuthenticationCompleteRequest) SetAcr(v string) {
o.Acr = &v
}
// GetClaims returns the Claims field value if set, zero value otherwise.
func (o *BackchannelAuthenticationCompleteRequest) GetClaims() string {
if o == nil || isNil(o.Claims) {
var ret string
return ret
}
return *o.Claims
}
// GetClaimsOk returns a tuple with the Claims field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BackchannelAuthenticationCompleteRequest) GetClaimsOk() (*string, bool) {
if o == nil || isNil(o.Claims) {
return nil, false
}
return o.Claims, true
}
// HasClaims returns a boolean if a field has been set.
func (o *BackchannelAuthenticationCompleteRequest) HasClaims() bool {
if o != nil && !isNil(o.Claims) {
return true
}
return false
}
// SetClaims gets a reference to the given string and assigns it to the Claims field.
func (o *BackchannelAuthenticationCompleteRequest) SetClaims(v string) {
o.Claims = &v
}
// GetProperties returns the Properties field value if set, zero value otherwise.
func (o *BackchannelAuthenticationCompleteRequest) GetProperties() []Property {
if o == nil || isNil(o.Properties) {
var ret []Property
return ret
}
return o.Properties
}
// GetPropertiesOk returns a tuple with the Properties field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BackchannelAuthenticationCompleteRequest) GetPropertiesOk() ([]Property, bool) {
if o == nil || isNil(o.Properties) {
return nil, false
}
return o.Properties, true
}
// HasProperties returns a boolean if a field has been set.
func (o *BackchannelAuthenticationCompleteRequest) HasProperties() bool {
if o != nil && !isNil(o.Properties) {
return true
}
return false
}
// SetProperties gets a reference to the given []Property and assigns it to the Properties field.
func (o *BackchannelAuthenticationCompleteRequest) SetProperties(v []Property) {
o.Properties = v
}
// GetScopes returns the Scopes field value if set, zero value otherwise.
func (o *BackchannelAuthenticationCompleteRequest) GetScopes() []string {
if o == nil || isNil(o.Scopes) {
var ret []string
return ret
}
return o.Scopes
}
// GetScopesOk returns a tuple with the Scopes field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BackchannelAuthenticationCompleteRequest) GetScopesOk() ([]string, bool) {
if o == nil || isNil(o.Scopes) {
return nil, false
}
return o.Scopes, true
}
// HasScopes returns a boolean if a field has been set.
func (o *BackchannelAuthenticationCompleteRequest) HasScopes() bool {
if o != nil && !isNil(o.Scopes) {
return true
}
return false
}
// SetScopes gets a reference to the given []string and assigns it to the Scopes field.
func (o *BackchannelAuthenticationCompleteRequest) SetScopes(v []string) {
o.Scopes = v
}
// GetIdtHeaderParams returns the IdtHeaderParams field value if set, zero value otherwise.
func (o *BackchannelAuthenticationCompleteRequest) GetIdtHeaderParams() string {
if o == nil || isNil(o.IdtHeaderParams) {
var ret string
return ret
}
return *o.IdtHeaderParams
}
// GetIdtHeaderParamsOk returns a tuple with the IdtHeaderParams field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BackchannelAuthenticationCompleteRequest) GetIdtHeaderParamsOk() (*string, bool) {
if o == nil || isNil(o.IdtHeaderParams) {
return nil, false
}
return o.IdtHeaderParams, true
}
// HasIdtHeaderParams returns a boolean if a field has been set.
func (o *BackchannelAuthenticationCompleteRequest) HasIdtHeaderParams() bool {
if o != nil && !isNil(o.IdtHeaderParams) {
return true
}
return false
}
// SetIdtHeaderParams gets a reference to the given string and assigns it to the IdtHeaderParams field.
func (o *BackchannelAuthenticationCompleteRequest) SetIdtHeaderParams(v string) {
o.IdtHeaderParams = &v
}
// GetErrorDescription returns the ErrorDescription field value if set, zero value otherwise.
func (o *BackchannelAuthenticationCompleteRequest) GetErrorDescription() string {
if o == nil || isNil(o.ErrorDescription) {
var ret string
return ret
}
return *o.ErrorDescription
}
// GetErrorDescriptionOk returns a tuple with the ErrorDescription field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BackchannelAuthenticationCompleteRequest) GetErrorDescriptionOk() (*string, bool) {
if o == nil || isNil(o.ErrorDescription) {
return nil, false
}
return o.ErrorDescription, true
}
// HasErrorDescription returns a boolean if a field has been set.
func (o *BackchannelAuthenticationCompleteRequest) HasErrorDescription() bool {
if o != nil && !isNil(o.ErrorDescription) {
return true
}
return false
}
// SetErrorDescription gets a reference to the given string and assigns it to the ErrorDescription field.
func (o *BackchannelAuthenticationCompleteRequest) SetErrorDescription(v string) {
o.ErrorDescription = &v
}
// GetErrorUri returns the ErrorUri field value if set, zero value otherwise.
func (o *BackchannelAuthenticationCompleteRequest) GetErrorUri() string {
if o == nil || isNil(o.ErrorUri) {
var ret string
return ret
}
return *o.ErrorUri
}
// GetErrorUriOk returns a tuple with the ErrorUri field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BackchannelAuthenticationCompleteRequest) GetErrorUriOk() (*string, bool) {
if o == nil || isNil(o.ErrorUri) {
return nil, false
}
return o.ErrorUri, true
}
// HasErrorUri returns a boolean if a field has been set.
func (o *BackchannelAuthenticationCompleteRequest) HasErrorUri() bool {
if o != nil && !isNil(o.ErrorUri) {
return true
}
return false
}
// SetErrorUri gets a reference to the given string and assigns it to the ErrorUri field.
func (o *BackchannelAuthenticationCompleteRequest) SetErrorUri(v string) {
o.ErrorUri = &v
}
// GetConsentedClaims returns the ConsentedClaims field value if set, zero value otherwise.
func (o *BackchannelAuthenticationCompleteRequest) GetConsentedClaims() []string {
if o == nil || isNil(o.ConsentedClaims) {
var ret []string
return ret
}
return o.ConsentedClaims
}
// GetConsentedClaimsOk returns a tuple with the ConsentedClaims field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BackchannelAuthenticationCompleteRequest) GetConsentedClaimsOk() ([]string, bool) {
if o == nil || isNil(o.ConsentedClaims) {
return nil, false
}
return o.ConsentedClaims, true
}
// HasConsentedClaims returns a boolean if a field has been set.
func (o *BackchannelAuthenticationCompleteRequest) HasConsentedClaims() bool {
if o != nil && !isNil(o.ConsentedClaims) {
return true
}
return false
}
// SetConsentedClaims gets a reference to the given []string and assigns it to the ConsentedClaims field.
func (o *BackchannelAuthenticationCompleteRequest) SetConsentedClaims(v []string) {
o.ConsentedClaims = v
}
// GetJwtAtClaims returns the JwtAtClaims field value if set, zero value otherwise.
func (o *BackchannelAuthenticationCompleteRequest) GetJwtAtClaims() string {
if o == nil || isNil(o.JwtAtClaims) {
var ret string
return ret
}
return *o.JwtAtClaims
}
// GetJwtAtClaimsOk returns a tuple with the JwtAtClaims field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BackchannelAuthenticationCompleteRequest) GetJwtAtClaimsOk() (*string, bool) {
if o == nil || isNil(o.JwtAtClaims) {
return nil, false
}
return o.JwtAtClaims, true
}
// HasJwtAtClaims returns a boolean if a field has been set.
func (o *BackchannelAuthenticationCompleteRequest) HasJwtAtClaims() bool {
if o != nil && !isNil(o.JwtAtClaims) {
return true
}
return false
}
// SetJwtAtClaims gets a reference to the given string and assigns it to the JwtAtClaims field.
func (o *BackchannelAuthenticationCompleteRequest) SetJwtAtClaims(v string) {
o.JwtAtClaims = &v
}
// GetAccessToken returns the AccessToken field value if set, zero value otherwise.
func (o *BackchannelAuthenticationCompleteRequest) GetAccessToken() string {
if o == nil || isNil(o.AccessToken) {
var ret string
return ret
}
return *o.AccessToken
}
// GetAccessTokenOk returns a tuple with the AccessToken field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *BackchannelAuthenticationCompleteRequest) GetAccessTokenOk() (*string, bool) {
if o == nil || isNil(o.AccessToken) {
return nil, false
}
return o.AccessToken, true
}
// HasAccessToken returns a boolean if a field has been set.
func (o *BackchannelAuthenticationCompleteRequest) HasAccessToken() bool {
if o != nil && !isNil(o.AccessToken) {
return true
}
return false
}
// SetAccessToken gets a reference to the given string and assigns it to the AccessToken field.
func (o *BackchannelAuthenticationCompleteRequest) SetAccessToken(v string) {
o.AccessToken = &v
}
func (o BackchannelAuthenticationCompleteRequest) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o BackchannelAuthenticationCompleteRequest) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["ticket"] = o.Ticket
toSerialize["result"] = o.Result
toSerialize["subject"] = o.Subject
if !isNil(o.Sub) {
toSerialize["sub"] = o.Sub
}
if !isNil(o.AuthTime) {
toSerialize["authTime"] = o.AuthTime
}
if !isNil(o.Acr) {
toSerialize["acr"] = o.Acr
}
if !isNil(o.Claims) {
toSerialize["claims"] = o.Claims
}
if !isNil(o.Properties) {
toSerialize["properties"] = o.Properties
}
if !isNil(o.Scopes) {
toSerialize["scopes"] = o.Scopes
}
if !isNil(o.IdtHeaderParams) {
toSerialize["idtHeaderParams"] = o.IdtHeaderParams
}
if !isNil(o.ErrorDescription) {
toSerialize["errorDescription"] = o.ErrorDescription
}
if !isNil(o.ErrorUri) {
toSerialize["errorUri"] = o.ErrorUri
}
if !isNil(o.ConsentedClaims) {
toSerialize["consentedClaims"] = o.ConsentedClaims
}
if !isNil(o.JwtAtClaims) {
toSerialize["jwtAtClaims"] = o.JwtAtClaims
}
if !isNil(o.AccessToken) {
toSerialize["accessToken"] = o.AccessToken
}
return toSerialize, nil
}
type NullableBackchannelAuthenticationCompleteRequest struct {
value *BackchannelAuthenticationCompleteRequest
isSet bool
}
func (v NullableBackchannelAuthenticationCompleteRequest) Get() *BackchannelAuthenticationCompleteRequest {
return v.value
}
func (v *NullableBackchannelAuthenticationCompleteRequest) Set(val *BackchannelAuthenticationCompleteRequest) {
v.value = val
v.isSet = true
}
func (v NullableBackchannelAuthenticationCompleteRequest) IsSet() bool {
return v.isSet
}
func (v *NullableBackchannelAuthenticationCompleteRequest) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableBackchannelAuthenticationCompleteRequest(val *BackchannelAuthenticationCompleteRequest) *NullableBackchannelAuthenticationCompleteRequest {
return &NullableBackchannelAuthenticationCompleteRequest{value: val, isSet: true}
}
func (v NullableBackchannelAuthenticationCompleteRequest) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableBackchannelAuthenticationCompleteRequest) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}