-
-
Notifications
You must be signed in to change notification settings - Fork 23
/
model_o_auth2_consent_request_open_id_connect_context.go
309 lines (253 loc) · 12.3 KB
/
model_o_auth2_consent_request_open_id_connect_context.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
/*
Ory Hydra API
Documentation for all of Ory Hydra's APIs.
API version: v2.2.1
Contact: [email protected]
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package client
import (
"encoding/json"
)
// checks if the OAuth2ConsentRequestOpenIDConnectContext type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &OAuth2ConsentRequestOpenIDConnectContext{}
// OAuth2ConsentRequestOpenIDConnectContext struct for OAuth2ConsentRequestOpenIDConnectContext
type OAuth2ConsentRequestOpenIDConnectContext struct {
// ACRValues is the Authentication AuthorizationContext Class Reference requested in the OAuth 2.0 Authorization request. It is a parameter defined by OpenID Connect and expresses which level of authentication (e.g. 2FA) is required. OpenID Connect defines it as follows: > Requested Authentication AuthorizationContext Class Reference values. Space-separated string that specifies the acr values that the Authorization Server is being requested to use for processing this Authentication Request, with the values appearing in order of preference. The Authentication AuthorizationContext Class satisfied by the authentication performed is returned as the acr Claim Value, as specified in Section 2. The acr Claim is requested as a Voluntary Claim by this parameter.
AcrValues []string `json:"acr_values,omitempty"`
// Display is a string value that specifies how the Authorization Server displays the authentication and consent user interface pages to the End-User. The defined values are: page: The Authorization Server SHOULD display the authentication and consent UI consistent with a full User Agent page view. If the display parameter is not specified, this is the default display mode. popup: The Authorization Server SHOULD display the authentication and consent UI consistent with a popup User Agent window. The popup User Agent window should be of an appropriate size for a login-focused dialog and should not obscure the entire window that it is popping up over. touch: The Authorization Server SHOULD display the authentication and consent UI consistent with a device that leverages a touch interface. wap: The Authorization Server SHOULD display the authentication and consent UI consistent with a \"feature phone\" type display. The Authorization Server MAY also attempt to detect the capabilities of the User Agent and present an appropriate display.
Display *string `json:"display,omitempty"`
// IDTokenHintClaims are the claims of the ID Token previously issued by the Authorization Server being passed as a hint about the End-User's current or past authenticated session with the Client.
IdTokenHintClaims map[string]interface{} `json:"id_token_hint_claims,omitempty"`
// LoginHint hints about the login identifier the End-User might use to log in (if necessary). This hint can be used by an RP if it first asks the End-User for their e-mail address (or other identifier) and then wants to pass that value as a hint to the discovered authorization service. This value MAY also be a phone number in the format specified for the phone_number Claim. The use of this parameter is optional.
LoginHint *string `json:"login_hint,omitempty"`
// UILocales is the End-User'id preferred languages and scripts for the user interface, represented as a space-separated list of BCP47 [RFC5646] language tag values, ordered by preference. For instance, the value \"fr-CA fr en\" represents a preference for French as spoken in Canada, then French (without a region designation), followed by English (without a region designation). An error SHOULD NOT result if some or all of the requested locales are not supported by the OpenID Provider.
UiLocales []string `json:"ui_locales,omitempty"`
AdditionalProperties map[string]interface{}
}
type _OAuth2ConsentRequestOpenIDConnectContext OAuth2ConsentRequestOpenIDConnectContext
// NewOAuth2ConsentRequestOpenIDConnectContext instantiates a new OAuth2ConsentRequestOpenIDConnectContext 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 NewOAuth2ConsentRequestOpenIDConnectContext() *OAuth2ConsentRequestOpenIDConnectContext {
this := OAuth2ConsentRequestOpenIDConnectContext{}
return &this
}
// NewOAuth2ConsentRequestOpenIDConnectContextWithDefaults instantiates a new OAuth2ConsentRequestOpenIDConnectContext 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 NewOAuth2ConsentRequestOpenIDConnectContextWithDefaults() *OAuth2ConsentRequestOpenIDConnectContext {
this := OAuth2ConsentRequestOpenIDConnectContext{}
return &this
}
// GetAcrValues returns the AcrValues field value if set, zero value otherwise.
func (o *OAuth2ConsentRequestOpenIDConnectContext) GetAcrValues() []string {
if o == nil || IsNil(o.AcrValues) {
var ret []string
return ret
}
return o.AcrValues
}
// GetAcrValuesOk returns a tuple with the AcrValues field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OAuth2ConsentRequestOpenIDConnectContext) GetAcrValuesOk() ([]string, bool) {
if o == nil || IsNil(o.AcrValues) {
return nil, false
}
return o.AcrValues, true
}
// HasAcrValues returns a boolean if a field has been set.
func (o *OAuth2ConsentRequestOpenIDConnectContext) HasAcrValues() bool {
if o != nil && !IsNil(o.AcrValues) {
return true
}
return false
}
// SetAcrValues gets a reference to the given []string and assigns it to the AcrValues field.
func (o *OAuth2ConsentRequestOpenIDConnectContext) SetAcrValues(v []string) {
o.AcrValues = v
}
// GetDisplay returns the Display field value if set, zero value otherwise.
func (o *OAuth2ConsentRequestOpenIDConnectContext) GetDisplay() string {
if o == nil || IsNil(o.Display) {
var ret string
return ret
}
return *o.Display
}
// GetDisplayOk returns a tuple with the Display field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OAuth2ConsentRequestOpenIDConnectContext) GetDisplayOk() (*string, bool) {
if o == nil || IsNil(o.Display) {
return nil, false
}
return o.Display, true
}
// HasDisplay returns a boolean if a field has been set.
func (o *OAuth2ConsentRequestOpenIDConnectContext) HasDisplay() bool {
if o != nil && !IsNil(o.Display) {
return true
}
return false
}
// SetDisplay gets a reference to the given string and assigns it to the Display field.
func (o *OAuth2ConsentRequestOpenIDConnectContext) SetDisplay(v string) {
o.Display = &v
}
// GetIdTokenHintClaims returns the IdTokenHintClaims field value if set, zero value otherwise.
func (o *OAuth2ConsentRequestOpenIDConnectContext) GetIdTokenHintClaims() map[string]interface{} {
if o == nil || IsNil(o.IdTokenHintClaims) {
var ret map[string]interface{}
return ret
}
return o.IdTokenHintClaims
}
// GetIdTokenHintClaimsOk returns a tuple with the IdTokenHintClaims field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OAuth2ConsentRequestOpenIDConnectContext) GetIdTokenHintClaimsOk() (map[string]interface{}, bool) {
if o == nil || IsNil(o.IdTokenHintClaims) {
return map[string]interface{}{}, false
}
return o.IdTokenHintClaims, true
}
// HasIdTokenHintClaims returns a boolean if a field has been set.
func (o *OAuth2ConsentRequestOpenIDConnectContext) HasIdTokenHintClaims() bool {
if o != nil && !IsNil(o.IdTokenHintClaims) {
return true
}
return false
}
// SetIdTokenHintClaims gets a reference to the given map[string]interface{} and assigns it to the IdTokenHintClaims field.
func (o *OAuth2ConsentRequestOpenIDConnectContext) SetIdTokenHintClaims(v map[string]interface{}) {
o.IdTokenHintClaims = v
}
// GetLoginHint returns the LoginHint field value if set, zero value otherwise.
func (o *OAuth2ConsentRequestOpenIDConnectContext) GetLoginHint() string {
if o == nil || IsNil(o.LoginHint) {
var ret string
return ret
}
return *o.LoginHint
}
// GetLoginHintOk returns a tuple with the LoginHint field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OAuth2ConsentRequestOpenIDConnectContext) GetLoginHintOk() (*string, bool) {
if o == nil || IsNil(o.LoginHint) {
return nil, false
}
return o.LoginHint, true
}
// HasLoginHint returns a boolean if a field has been set.
func (o *OAuth2ConsentRequestOpenIDConnectContext) HasLoginHint() bool {
if o != nil && !IsNil(o.LoginHint) {
return true
}
return false
}
// SetLoginHint gets a reference to the given string and assigns it to the LoginHint field.
func (o *OAuth2ConsentRequestOpenIDConnectContext) SetLoginHint(v string) {
o.LoginHint = &v
}
// GetUiLocales returns the UiLocales field value if set, zero value otherwise.
func (o *OAuth2ConsentRequestOpenIDConnectContext) GetUiLocales() []string {
if o == nil || IsNil(o.UiLocales) {
var ret []string
return ret
}
return o.UiLocales
}
// GetUiLocalesOk returns a tuple with the UiLocales field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OAuth2ConsentRequestOpenIDConnectContext) GetUiLocalesOk() ([]string, bool) {
if o == nil || IsNil(o.UiLocales) {
return nil, false
}
return o.UiLocales, true
}
// HasUiLocales returns a boolean if a field has been set.
func (o *OAuth2ConsentRequestOpenIDConnectContext) HasUiLocales() bool {
if o != nil && !IsNil(o.UiLocales) {
return true
}
return false
}
// SetUiLocales gets a reference to the given []string and assigns it to the UiLocales field.
func (o *OAuth2ConsentRequestOpenIDConnectContext) SetUiLocales(v []string) {
o.UiLocales = v
}
func (o OAuth2ConsentRequestOpenIDConnectContext) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o OAuth2ConsentRequestOpenIDConnectContext) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.AcrValues) {
toSerialize["acr_values"] = o.AcrValues
}
if !IsNil(o.Display) {
toSerialize["display"] = o.Display
}
if !IsNil(o.IdTokenHintClaims) {
toSerialize["id_token_hint_claims"] = o.IdTokenHintClaims
}
if !IsNil(o.LoginHint) {
toSerialize["login_hint"] = o.LoginHint
}
if !IsNil(o.UiLocales) {
toSerialize["ui_locales"] = o.UiLocales
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *OAuth2ConsentRequestOpenIDConnectContext) UnmarshalJSON(data []byte) (err error) {
varOAuth2ConsentRequestOpenIDConnectContext := _OAuth2ConsentRequestOpenIDConnectContext{}
err = json.Unmarshal(data, &varOAuth2ConsentRequestOpenIDConnectContext)
if err != nil {
return err
}
*o = OAuth2ConsentRequestOpenIDConnectContext(varOAuth2ConsentRequestOpenIDConnectContext)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "acr_values")
delete(additionalProperties, "display")
delete(additionalProperties, "id_token_hint_claims")
delete(additionalProperties, "login_hint")
delete(additionalProperties, "ui_locales")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableOAuth2ConsentRequestOpenIDConnectContext struct {
value *OAuth2ConsentRequestOpenIDConnectContext
isSet bool
}
func (v NullableOAuth2ConsentRequestOpenIDConnectContext) Get() *OAuth2ConsentRequestOpenIDConnectContext {
return v.value
}
func (v *NullableOAuth2ConsentRequestOpenIDConnectContext) Set(val *OAuth2ConsentRequestOpenIDConnectContext) {
v.value = val
v.isSet = true
}
func (v NullableOAuth2ConsentRequestOpenIDConnectContext) IsSet() bool {
return v.isSet
}
func (v *NullableOAuth2ConsentRequestOpenIDConnectContext) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableOAuth2ConsentRequestOpenIDConnectContext(val *OAuth2ConsentRequestOpenIDConnectContext) *NullableOAuth2ConsentRequestOpenIDConnectContext {
return &NullableOAuth2ConsentRequestOpenIDConnectContext{value: val, isSet: true}
}
func (v NullableOAuth2ConsentRequestOpenIDConnectContext) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableOAuth2ConsentRequestOpenIDConnectContext) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}