Class: OryClient::OAuth2Client

Inherits:
Object
  • Object
show all
Defined in:
lib/ory-client/models/o_auth2_client.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ OAuth2Client

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



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
# File 'lib/ory-client/models/o_auth2_client.rb', line 268

def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `OryClient::OAuth2Client` initialize method"
  end

  # check to see if the attribute exists and convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h|
    if (!self.class.attribute_map.key?(k.to_sym))
      fail ArgumentError, "`#{k}` is not a valid attribute in `OryClient::OAuth2Client`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
    end
    h[k.to_sym] = v
  }

  if attributes.key?(:'allowed_cors_origins')
    if (value = attributes[:'allowed_cors_origins']).is_a?(Array)
      self.allowed_cors_origins = value
    end
  end

  if attributes.key?(:'audience')
    if (value = attributes[:'audience']).is_a?(Array)
      self.audience = value
    end
  end

  if attributes.key?(:'authorization_code_grant_access_token_lifespan')
    self.authorization_code_grant_access_token_lifespan = attributes[:'authorization_code_grant_access_token_lifespan']
  end

  if attributes.key?(:'authorization_code_grant_id_token_lifespan')
    self.authorization_code_grant_id_token_lifespan = attributes[:'authorization_code_grant_id_token_lifespan']
  end

  if attributes.key?(:'authorization_code_grant_refresh_token_lifespan')
    self.authorization_code_grant_refresh_token_lifespan = attributes[:'authorization_code_grant_refresh_token_lifespan']
  end

  if attributes.key?(:'backchannel_logout_session_required')
    self.backchannel_logout_session_required = attributes[:'backchannel_logout_session_required']
  end

  if attributes.key?(:'backchannel_logout_uri')
    self.backchannel_logout_uri = attributes[:'backchannel_logout_uri']
  end

  if attributes.key?(:'client_credentials_grant_access_token_lifespan')
    self.client_credentials_grant_access_token_lifespan = attributes[:'client_credentials_grant_access_token_lifespan']
  end

  if attributes.key?(:'client_id')
    self.client_id = attributes[:'client_id']
  end

  if attributes.key?(:'client_name')
    self.client_name = attributes[:'client_name']
  end

  if attributes.key?(:'client_secret')
    self.client_secret = attributes[:'client_secret']
  end

  if attributes.key?(:'client_secret_expires_at')
    self.client_secret_expires_at = attributes[:'client_secret_expires_at']
  end

  if attributes.key?(:'client_uri')
    self.client_uri = attributes[:'client_uri']
  end

  if attributes.key?(:'contacts')
    if (value = attributes[:'contacts']).is_a?(Array)
      self.contacts = value
    end
  end

  if attributes.key?(:'created_at')
    self.created_at = attributes[:'created_at']
  end

  if attributes.key?(:'frontchannel_logout_session_required')
    self.frontchannel_logout_session_required = attributes[:'frontchannel_logout_session_required']
  end

  if attributes.key?(:'frontchannel_logout_uri')
    self.frontchannel_logout_uri = attributes[:'frontchannel_logout_uri']
  end

  if attributes.key?(:'grant_types')
    if (value = attributes[:'grant_types']).is_a?(Array)
      self.grant_types = value
    end
  end

  if attributes.key?(:'implicit_grant_access_token_lifespan')
    self.implicit_grant_access_token_lifespan = attributes[:'implicit_grant_access_token_lifespan']
  end

  if attributes.key?(:'implicit_grant_id_token_lifespan')
    self.implicit_grant_id_token_lifespan = attributes[:'implicit_grant_id_token_lifespan']
  end

  if attributes.key?(:'jwks')
    self.jwks = attributes[:'jwks']
  end

  if attributes.key?(:'jwks_uri')
    self.jwks_uri = attributes[:'jwks_uri']
  end

  if attributes.key?(:'jwt_bearer_grant_access_token_lifespan')
    self.jwt_bearer_grant_access_token_lifespan = attributes[:'jwt_bearer_grant_access_token_lifespan']
  end

  if attributes.key?(:'logo_uri')
    self.logo_uri = attributes[:'logo_uri']
  end

  if attributes.key?(:'metadata')
    self. = attributes[:'metadata']
  end

  if attributes.key?(:'owner')
    self.owner = attributes[:'owner']
  end

  if attributes.key?(:'password_grant_access_token_lifespan')
    self.password_grant_access_token_lifespan = attributes[:'password_grant_access_token_lifespan']
  end

  if attributes.key?(:'password_grant_refresh_token_lifespan')
    self.password_grant_refresh_token_lifespan = attributes[:'password_grant_refresh_token_lifespan']
  end

  if attributes.key?(:'policy_uri')
    self.policy_uri = attributes[:'policy_uri']
  end

  if attributes.key?(:'post_logout_redirect_uris')
    if (value = attributes[:'post_logout_redirect_uris']).is_a?(Array)
      self.post_logout_redirect_uris = value
    end
  end

  if attributes.key?(:'redirect_uris')
    if (value = attributes[:'redirect_uris']).is_a?(Array)
      self.redirect_uris = value
    end
  end

  if attributes.key?(:'refresh_token_grant_access_token_lifespan')
    self.refresh_token_grant_access_token_lifespan = attributes[:'refresh_token_grant_access_token_lifespan']
  end

  if attributes.key?(:'refresh_token_grant_id_token_lifespan')
    self.refresh_token_grant_id_token_lifespan = attributes[:'refresh_token_grant_id_token_lifespan']
  end

  if attributes.key?(:'refresh_token_grant_refresh_token_lifespan')
    self.refresh_token_grant_refresh_token_lifespan = attributes[:'refresh_token_grant_refresh_token_lifespan']
  end

  if attributes.key?(:'registration_access_token')
    self.registration_access_token = attributes[:'registration_access_token']
  end

  if attributes.key?(:'registration_client_uri')
    self.registration_client_uri = attributes[:'registration_client_uri']
  end

  if attributes.key?(:'request_object_signing_alg')
    self.request_object_signing_alg = attributes[:'request_object_signing_alg']
  end

  if attributes.key?(:'request_uris')
    if (value = attributes[:'request_uris']).is_a?(Array)
      self.request_uris = value
    end
  end

  if attributes.key?(:'response_types')
    if (value = attributes[:'response_types']).is_a?(Array)
      self.response_types = value
    end
  end

  if attributes.key?(:'scope')
    self.scope = attributes[:'scope']
  end

  if attributes.key?(:'sector_identifier_uri')
    self.sector_identifier_uri = attributes[:'sector_identifier_uri']
  end

  if attributes.key?(:'subject_type')
    self.subject_type = attributes[:'subject_type']
  end

  if attributes.key?(:'token_endpoint_auth_method')
    self.token_endpoint_auth_method = attributes[:'token_endpoint_auth_method']
  end

  if attributes.key?(:'token_endpoint_auth_signing_alg')
    self.token_endpoint_auth_signing_alg = attributes[:'token_endpoint_auth_signing_alg']
  end

  if attributes.key?(:'tos_uri')
    self.tos_uri = attributes[:'tos_uri']
  end

  if attributes.key?(:'updated_at')
    self.updated_at = attributes[:'updated_at']
  end

  if attributes.key?(:'userinfo_signed_response_alg')
    self.userinfo_signed_response_alg = attributes[:'userinfo_signed_response_alg']
  end
end

Instance Attribute Details

#allowed_cors_originsObject

Returns the value of attribute allowed_cors_origins.



18
19
20
# File 'lib/ory-client/models/o_auth2_client.rb', line 18

def allowed_cors_origins
  @allowed_cors_origins
end

#audienceObject

Returns the value of attribute audience.



20
21
22
# File 'lib/ory-client/models/o_auth2_client.rb', line 20

def audience
  @audience
end

#authorization_code_grant_access_token_lifespanObject

Returns the value of attribute authorization_code_grant_access_token_lifespan.



22
23
24
# File 'lib/ory-client/models/o_auth2_client.rb', line 22

def authorization_code_grant_access_token_lifespan
  @authorization_code_grant_access_token_lifespan
end

#authorization_code_grant_id_token_lifespanObject

Returns the value of attribute authorization_code_grant_id_token_lifespan.



24
25
26
# File 'lib/ory-client/models/o_auth2_client.rb', line 24

def authorization_code_grant_id_token_lifespan
  @authorization_code_grant_id_token_lifespan
end

#authorization_code_grant_refresh_token_lifespanObject

Returns the value of attribute authorization_code_grant_refresh_token_lifespan.



26
27
28
# File 'lib/ory-client/models/o_auth2_client.rb', line 26

def authorization_code_grant_refresh_token_lifespan
  @authorization_code_grant_refresh_token_lifespan
end

#backchannel_logout_session_requiredObject

Boolean value specifying whether the RP requires that a sid (session ID) Claim be included in the Logout Token to identify the RP session with the OP when the backchannel_logout_uri is used. If omitted, the default value is false.



29
30
31
# File 'lib/ory-client/models/o_auth2_client.rb', line 29

def backchannel_logout_session_required
  @backchannel_logout_session_required
end

#backchannel_logout_uriObject

RP URL that will cause the RP to log itself out when sent a Logout Token by the OP.



32
33
34
# File 'lib/ory-client/models/o_auth2_client.rb', line 32

def backchannel_logout_uri
  @backchannel_logout_uri
end

#client_credentials_grant_access_token_lifespanObject

Returns the value of attribute client_credentials_grant_access_token_lifespan.



34
35
36
# File 'lib/ory-client/models/o_auth2_client.rb', line 34

def client_credentials_grant_access_token_lifespan
  @client_credentials_grant_access_token_lifespan
end

#client_idObject

ID is the id for this client. The ID is autogenerated and immutable.



37
38
39
# File 'lib/ory-client/models/o_auth2_client.rb', line 37

def client_id
  @client_id
end

#client_nameObject

Name is the human-readable string name of the client to be presented to the end-user during authorization.



40
41
42
# File 'lib/ory-client/models/o_auth2_client.rb', line 40

def client_name
  @client_name
end

#client_secretObject

Secret is the client's secret. The secret will be included in the create request as cleartext, and then never again. The secret is stored using BCrypt so it is impossible to recover it. Tell your users that they need to write the secret down as it will not be made available again.



43
44
45
# File 'lib/ory-client/models/o_auth2_client.rb', line 43

def client_secret
  @client_secret
end

#client_secret_expires_atObject

SecretExpiresAt is an integer holding the time at which the client secret will expire or 0 if it will not expire. The time is represented as the number of seconds from 1970-01-01T00:00:00Z as measured in UTC until the date/time of expiration. This feature is currently not supported and it's value will always be set to 0.



46
47
48
# File 'lib/ory-client/models/o_auth2_client.rb', line 46

def client_secret_expires_at
  @client_secret_expires_at
end

#client_uriObject

ClientURI is an URL string of a web page providing information about the client. If present, the server SHOULD display this URL to the end-user in a clickable fashion.



49
50
51
# File 'lib/ory-client/models/o_auth2_client.rb', line 49

def client_uri
  @client_uri
end

#contactsObject

Returns the value of attribute contacts.



51
52
53
# File 'lib/ory-client/models/o_auth2_client.rb', line 51

def contacts
  @contacts
end

#created_atObject

CreatedAt returns the timestamp of the client's creation.



54
55
56
# File 'lib/ory-client/models/o_auth2_client.rb', line 54

def created_at
  @created_at
end

#frontchannel_logout_session_requiredObject

Boolean value specifying whether the RP requires that iss (issuer) and sid (session ID) query parameters be included to identify the RP session with the OP when the frontchannel_logout_uri is used. If omitted, the default value is false.



57
58
59
# File 'lib/ory-client/models/o_auth2_client.rb', line 57

def frontchannel_logout_session_required
  @frontchannel_logout_session_required
end

#frontchannel_logout_uriObject

RP URL that will cause the RP to log itself out when rendered in an iframe by the OP. An iss (issuer) query parameter and a sid (session ID) query parameter MAY be included by the OP to enable the RP to validate the request and to determine which of the potentially multiple sessions is to be logged out; if either is included, both MUST be.



60
61
62
# File 'lib/ory-client/models/o_auth2_client.rb', line 60

def frontchannel_logout_uri
  @frontchannel_logout_uri
end

#grant_typesObject

Returns the value of attribute grant_types.



62
63
64
# File 'lib/ory-client/models/o_auth2_client.rb', line 62

def grant_types
  @grant_types
end

#implicit_grant_access_token_lifespanObject

Returns the value of attribute implicit_grant_access_token_lifespan.



64
65
66
# File 'lib/ory-client/models/o_auth2_client.rb', line 64

def implicit_grant_access_token_lifespan
  @implicit_grant_access_token_lifespan
end

#implicit_grant_id_token_lifespanObject

Returns the value of attribute implicit_grant_id_token_lifespan.



66
67
68
# File 'lib/ory-client/models/o_auth2_client.rb', line 66

def implicit_grant_id_token_lifespan
  @implicit_grant_id_token_lifespan
end

#jwksObject

Returns the value of attribute jwks.



68
69
70
# File 'lib/ory-client/models/o_auth2_client.rb', line 68

def jwks
  @jwks
end

#jwks_uriObject

URL for the Client's JSON Web Key Set [JWK] document. If the Client signs requests to the Server, it contains the signing key(s) the Server uses to validate signatures from the Client. The JWK Set MAY also contain the Client's encryption keys(s), which are used by the Server to encrypt responses to the Client. When both signing and encryption keys are made available, a use (Key Use) parameter value is REQUIRED for all keys in the referenced JWK Set to indicate each key's intended usage. Although some algorithms allow the same key to be used for both signatures and encryption, doing so is NOT RECOMMENDED, as it is less secure. The JWK x5c parameter MAY be used to provide X.509 representations of keys provided. When used, the bare key values MUST still be present and MUST match those in the certificate.



71
72
73
# File 'lib/ory-client/models/o_auth2_client.rb', line 71

def jwks_uri
  @jwks_uri
end

#jwt_bearer_grant_access_token_lifespanObject

Returns the value of attribute jwt_bearer_grant_access_token_lifespan.



73
74
75
# File 'lib/ory-client/models/o_auth2_client.rb', line 73

def jwt_bearer_grant_access_token_lifespan
  @jwt_bearer_grant_access_token_lifespan
end

#logo_uriObject

LogoURI is an URL string that references a logo for the client.



76
77
78
# File 'lib/ory-client/models/o_auth2_client.rb', line 76

def logo_uri
  @logo_uri
end

#metadataObject

Returns the value of attribute metadata.



78
79
80
# File 'lib/ory-client/models/o_auth2_client.rb', line 78

def 
  @metadata
end

#ownerObject

Owner is a string identifying the owner of the OAuth 2.0 Client.



81
82
83
# File 'lib/ory-client/models/o_auth2_client.rb', line 81

def owner
  @owner
end

#password_grant_access_token_lifespanObject

Returns the value of attribute password_grant_access_token_lifespan.



83
84
85
# File 'lib/ory-client/models/o_auth2_client.rb', line 83

def password_grant_access_token_lifespan
  @password_grant_access_token_lifespan
end

#password_grant_refresh_token_lifespanObject

Returns the value of attribute password_grant_refresh_token_lifespan.



85
86
87
# File 'lib/ory-client/models/o_auth2_client.rb', line 85

def password_grant_refresh_token_lifespan
  @password_grant_refresh_token_lifespan
end

#policy_uriObject

PolicyURI is a URL string that points to a human-readable privacy policy document that describes how the deployment organization collects, uses, retains, and discloses personal data.



88
89
90
# File 'lib/ory-client/models/o_auth2_client.rb', line 88

def policy_uri
  @policy_uri
end

#post_logout_redirect_urisObject

Returns the value of attribute post_logout_redirect_uris.



90
91
92
# File 'lib/ory-client/models/o_auth2_client.rb', line 90

def post_logout_redirect_uris
  @post_logout_redirect_uris
end

#redirect_urisObject

Returns the value of attribute redirect_uris.



92
93
94
# File 'lib/ory-client/models/o_auth2_client.rb', line 92

def redirect_uris
  @redirect_uris
end

#refresh_token_grant_access_token_lifespanObject

Returns the value of attribute refresh_token_grant_access_token_lifespan.



94
95
96
# File 'lib/ory-client/models/o_auth2_client.rb', line 94

def refresh_token_grant_access_token_lifespan
  @refresh_token_grant_access_token_lifespan
end

#refresh_token_grant_id_token_lifespanObject

Returns the value of attribute refresh_token_grant_id_token_lifespan.



96
97
98
# File 'lib/ory-client/models/o_auth2_client.rb', line 96

def refresh_token_grant_id_token_lifespan
  @refresh_token_grant_id_token_lifespan
end

#refresh_token_grant_refresh_token_lifespanObject

Returns the value of attribute refresh_token_grant_refresh_token_lifespan.



98
99
100
# File 'lib/ory-client/models/o_auth2_client.rb', line 98

def refresh_token_grant_refresh_token_lifespan
  @refresh_token_grant_refresh_token_lifespan
end

#registration_access_tokenObject

RegistrationAccessToken can be used to update, get, or delete the OAuth2 Client.



101
102
103
# File 'lib/ory-client/models/o_auth2_client.rb', line 101

def registration_access_token
  @registration_access_token
end

#registration_client_uriObject

RegistrationClientURI is the URL used to update, get, or delete the OAuth2 Client.



104
105
106
# File 'lib/ory-client/models/o_auth2_client.rb', line 104

def registration_client_uri
  @registration_client_uri
end

#request_object_signing_algObject

JWS [JWS] alg algorithm [JWA] that MUST be used for signing Request Objects sent to the OP. All Request Objects from this Client MUST be rejected, if not signed with this algorithm.



107
108
109
# File 'lib/ory-client/models/o_auth2_client.rb', line 107

def request_object_signing_alg
  @request_object_signing_alg
end

#request_urisObject

Returns the value of attribute request_uris.



109
110
111
# File 'lib/ory-client/models/o_auth2_client.rb', line 109

def request_uris
  @request_uris
end

#response_typesObject

Returns the value of attribute response_types.



111
112
113
# File 'lib/ory-client/models/o_auth2_client.rb', line 111

def response_types
  @response_types
end

#scopeObject

Scope is a string containing a space-separated list of scope values (as described in Section 3.3 of OAuth 2.0 [RFC6749]) that the client can use when requesting access tokens.



114
115
116
# File 'lib/ory-client/models/o_auth2_client.rb', line 114

def scope
  @scope
end

#sector_identifier_uriObject

URL using the https scheme to be used in calculating Pseudonymous Identifiers by the OP. The URL references a file with a single JSON array of redirect_uri values.



117
118
119
# File 'lib/ory-client/models/o_auth2_client.rb', line 117

def sector_identifier_uri
  @sector_identifier_uri
end

#subject_typeObject

SubjectType requested for responses to this Client. The subject_types_supported Discovery parameter contains a list of the supported subject_type values for this server. Valid types include `pairwise` and `public`.



120
121
122
# File 'lib/ory-client/models/o_auth2_client.rb', line 120

def subject_type
  @subject_type
end

#token_endpoint_auth_methodObject

Requested Client Authentication method for the Token Endpoint. The options are client_secret_post, client_secret_basic, private_key_jwt, and none.



123
124
125
# File 'lib/ory-client/models/o_auth2_client.rb', line 123

def token_endpoint_auth_method
  @token_endpoint_auth_method
end

#token_endpoint_auth_signing_algObject

Requested Client Authentication signing algorithm for the Token Endpoint.



126
127
128
# File 'lib/ory-client/models/o_auth2_client.rb', line 126

def token_endpoint_auth_signing_alg
  @token_endpoint_auth_signing_alg
end

#tos_uriObject

TermsOfServiceURI is a URL string that points to a human-readable terms of service document for the client that describes a contractual relationship between the end-user and the client that the end-user accepts when authorizing the client.



129
130
131
# File 'lib/ory-client/models/o_auth2_client.rb', line 129

def tos_uri
  @tos_uri
end

#updated_atObject

UpdatedAt returns the timestamp of the last update.



132
133
134
# File 'lib/ory-client/models/o_auth2_client.rb', line 132

def updated_at
  @updated_at
end

#userinfo_signed_response_algObject

JWS alg algorithm [JWA] REQUIRED for signing UserInfo Responses. If this is specified, the response will be JWT [JWT] serialized, and signed using JWS. The default, if omitted, is for the UserInfo Response to return the Claims as a UTF-8 encoded JSON object using the application/json content-type.



135
136
137
# File 'lib/ory-client/models/o_auth2_client.rb', line 135

def userinfo_signed_response_alg
  @userinfo_signed_response_alg
end

Class Method Details

.acceptable_attributesObject

Returns all the JSON keys this model knows about



191
192
193
# File 'lib/ory-client/models/o_auth2_client.rb', line 191

def self.acceptable_attributes
  attribute_map.values
end

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



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
# File 'lib/ory-client/models/o_auth2_client.rb', line 138

def self.attribute_map
  {
    :'allowed_cors_origins' => :'allowed_cors_origins',
    :'audience' => :'audience',
    :'authorization_code_grant_access_token_lifespan' => :'authorization_code_grant_access_token_lifespan',
    :'authorization_code_grant_id_token_lifespan' => :'authorization_code_grant_id_token_lifespan',
    :'authorization_code_grant_refresh_token_lifespan' => :'authorization_code_grant_refresh_token_lifespan',
    :'backchannel_logout_session_required' => :'backchannel_logout_session_required',
    :'backchannel_logout_uri' => :'backchannel_logout_uri',
    :'client_credentials_grant_access_token_lifespan' => :'client_credentials_grant_access_token_lifespan',
    :'client_id' => :'client_id',
    :'client_name' => :'client_name',
    :'client_secret' => :'client_secret',
    :'client_secret_expires_at' => :'client_secret_expires_at',
    :'client_uri' => :'client_uri',
    :'contacts' => :'contacts',
    :'created_at' => :'created_at',
    :'frontchannel_logout_session_required' => :'frontchannel_logout_session_required',
    :'frontchannel_logout_uri' => :'frontchannel_logout_uri',
    :'grant_types' => :'grant_types',
    :'implicit_grant_access_token_lifespan' => :'implicit_grant_access_token_lifespan',
    :'implicit_grant_id_token_lifespan' => :'implicit_grant_id_token_lifespan',
    :'jwks' => :'jwks',
    :'jwks_uri' => :'jwks_uri',
    :'jwt_bearer_grant_access_token_lifespan' => :'jwt_bearer_grant_access_token_lifespan',
    :'logo_uri' => :'logo_uri',
    :'metadata' => :'metadata',
    :'owner' => :'owner',
    :'password_grant_access_token_lifespan' => :'password_grant_access_token_lifespan',
    :'password_grant_refresh_token_lifespan' => :'password_grant_refresh_token_lifespan',
    :'policy_uri' => :'policy_uri',
    :'post_logout_redirect_uris' => :'post_logout_redirect_uris',
    :'redirect_uris' => :'redirect_uris',
    :'refresh_token_grant_access_token_lifespan' => :'refresh_token_grant_access_token_lifespan',
    :'refresh_token_grant_id_token_lifespan' => :'refresh_token_grant_id_token_lifespan',
    :'refresh_token_grant_refresh_token_lifespan' => :'refresh_token_grant_refresh_token_lifespan',
    :'registration_access_token' => :'registration_access_token',
    :'registration_client_uri' => :'registration_client_uri',
    :'request_object_signing_alg' => :'request_object_signing_alg',
    :'request_uris' => :'request_uris',
    :'response_types' => :'response_types',
    :'scope' => :'scope',
    :'sector_identifier_uri' => :'sector_identifier_uri',
    :'subject_type' => :'subject_type',
    :'token_endpoint_auth_method' => :'token_endpoint_auth_method',
    :'token_endpoint_auth_signing_alg' => :'token_endpoint_auth_signing_alg',
    :'tos_uri' => :'tos_uri',
    :'updated_at' => :'updated_at',
    :'userinfo_signed_response_alg' => :'userinfo_signed_response_alg'
  }
end

.build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



772
773
774
# File 'lib/ory-client/models/o_auth2_client.rb', line 772

def self.build_from_hash(attributes)
  new.build_from_hash(attributes)
end

.openapi_nullableObject

List of attributes with nullable: true



249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
# File 'lib/ory-client/models/o_auth2_client.rb', line 249

def self.openapi_nullable
  Set.new([
    :'authorization_code_grant_access_token_lifespan',
    :'authorization_code_grant_id_token_lifespan',
    :'authorization_code_grant_refresh_token_lifespan',
    :'client_credentials_grant_access_token_lifespan',
    :'implicit_grant_access_token_lifespan',
    :'implicit_grant_id_token_lifespan',
    :'jwt_bearer_grant_access_token_lifespan',
    :'password_grant_access_token_lifespan',
    :'password_grant_refresh_token_lifespan',
    :'refresh_token_grant_access_token_lifespan',
    :'refresh_token_grant_id_token_lifespan',
    :'refresh_token_grant_refresh_token_lifespan',
  ])
end

.openapi_typesObject

Attribute type mapping.



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
# File 'lib/ory-client/models/o_auth2_client.rb', line 196

def self.openapi_types
  {
    :'allowed_cors_origins' => :'Array<String>',
    :'audience' => :'Array<String>',
    :'authorization_code_grant_access_token_lifespan' => :'String',
    :'authorization_code_grant_id_token_lifespan' => :'String',
    :'authorization_code_grant_refresh_token_lifespan' => :'String',
    :'backchannel_logout_session_required' => :'Boolean',
    :'backchannel_logout_uri' => :'String',
    :'client_credentials_grant_access_token_lifespan' => :'String',
    :'client_id' => :'String',
    :'client_name' => :'String',
    :'client_secret' => :'String',
    :'client_secret_expires_at' => :'Integer',
    :'client_uri' => :'String',
    :'contacts' => :'Array<String>',
    :'created_at' => :'Time',
    :'frontchannel_logout_session_required' => :'Boolean',
    :'frontchannel_logout_uri' => :'String',
    :'grant_types' => :'Array<String>',
    :'implicit_grant_access_token_lifespan' => :'String',
    :'implicit_grant_id_token_lifespan' => :'String',
    :'jwks' => :'Object',
    :'jwks_uri' => :'String',
    :'jwt_bearer_grant_access_token_lifespan' => :'String',
    :'logo_uri' => :'String',
    :'metadata' => :'Object',
    :'owner' => :'String',
    :'password_grant_access_token_lifespan' => :'String',
    :'password_grant_refresh_token_lifespan' => :'String',
    :'policy_uri' => :'String',
    :'post_logout_redirect_uris' => :'Array<String>',
    :'redirect_uris' => :'Array<String>',
    :'refresh_token_grant_access_token_lifespan' => :'String',
    :'refresh_token_grant_id_token_lifespan' => :'String',
    :'refresh_token_grant_refresh_token_lifespan' => :'String',
    :'registration_access_token' => :'String',
    :'registration_client_uri' => :'String',
    :'request_object_signing_alg' => :'String',
    :'request_uris' => :'Array<String>',
    :'response_types' => :'Array<String>',
    :'scope' => :'String',
    :'sector_identifier_uri' => :'String',
    :'subject_type' => :'String',
    :'token_endpoint_auth_method' => :'String',
    :'token_endpoint_auth_signing_alg' => :'String',
    :'tos_uri' => :'String',
    :'updated_at' => :'Time',
    :'userinfo_signed_response_alg' => :'String'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
# File 'lib/ory-client/models/o_auth2_client.rb', line 705

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      allowed_cors_origins == o.allowed_cors_origins &&
      audience == o.audience &&
      authorization_code_grant_access_token_lifespan == o.authorization_code_grant_access_token_lifespan &&
      authorization_code_grant_id_token_lifespan == o.authorization_code_grant_id_token_lifespan &&
      authorization_code_grant_refresh_token_lifespan == o.authorization_code_grant_refresh_token_lifespan &&
      backchannel_logout_session_required == o.backchannel_logout_session_required &&
      backchannel_logout_uri == o.backchannel_logout_uri &&
      client_credentials_grant_access_token_lifespan == o.client_credentials_grant_access_token_lifespan &&
      client_id == o.client_id &&
      client_name == o.client_name &&
      client_secret == o.client_secret &&
      client_secret_expires_at == o.client_secret_expires_at &&
      client_uri == o.client_uri &&
      contacts == o.contacts &&
      created_at == o.created_at &&
      frontchannel_logout_session_required == o.frontchannel_logout_session_required &&
      frontchannel_logout_uri == o.frontchannel_logout_uri &&
      grant_types == o.grant_types &&
      implicit_grant_access_token_lifespan == o.implicit_grant_access_token_lifespan &&
      implicit_grant_id_token_lifespan == o.implicit_grant_id_token_lifespan &&
      jwks == o.jwks &&
      jwks_uri == o.jwks_uri &&
      jwt_bearer_grant_access_token_lifespan == o.jwt_bearer_grant_access_token_lifespan &&
      logo_uri == o.logo_uri &&
       == o. &&
      owner == o.owner &&
      password_grant_access_token_lifespan == o.password_grant_access_token_lifespan &&
      password_grant_refresh_token_lifespan == o.password_grant_refresh_token_lifespan &&
      policy_uri == o.policy_uri &&
      post_logout_redirect_uris == o.post_logout_redirect_uris &&
      redirect_uris == o.redirect_uris &&
      refresh_token_grant_access_token_lifespan == o.refresh_token_grant_access_token_lifespan &&
      refresh_token_grant_id_token_lifespan == o.refresh_token_grant_id_token_lifespan &&
      refresh_token_grant_refresh_token_lifespan == o.refresh_token_grant_refresh_token_lifespan &&
      registration_access_token == o.registration_access_token &&
      registration_client_uri == o.registration_client_uri &&
      request_object_signing_alg == o.request_object_signing_alg &&
      request_uris == o.request_uris &&
      response_types == o.response_types &&
      scope == o.scope &&
      sector_identifier_uri == o.sector_identifier_uri &&
      subject_type == o.subject_type &&
      token_endpoint_auth_method == o.token_endpoint_auth_method &&
      token_endpoint_auth_signing_alg == o.token_endpoint_auth_signing_alg &&
      tos_uri == o.tos_uri &&
      updated_at == o.updated_at &&
      userinfo_signed_response_alg == o.userinfo_signed_response_alg
end

#_deserialize(type, value) ⇒ Object

Deserializes the data based on type

Parameters:

  • string

    type Data type

  • string

    value Value to be deserialized

Returns:

  • (Object)

    Deserialized data



803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
# File 'lib/ory-client/models/o_auth2_client.rb', line 803

def _deserialize(type, value)
  case type.to_sym
  when :Time
    Time.parse(value)
  when :Date
    Date.parse(value)
  when :String
    value.to_s
  when :Integer
    value.to_i
  when :Float
    value.to_f
  when :Boolean
    if value.to_s =~ /\A(true|t|yes|y|1)\z/i
      true
    else
      false
    end
  when :Object
    # generic object (usually a Hash), return directly
    value
  when /\AArray<(?<inner_type>.+)>\z/
    inner_type = Regexp.last_match[:inner_type]
    value.map { |v| _deserialize(inner_type, v) }
  when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
    k_type = Regexp.last_match[:k_type]
    v_type = Regexp.last_match[:v_type]
    {}.tap do |hash|
      value.each do |k, v|
        hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
      end
    end
  else # model
    # models (e.g. Pet) or oneOf
    klass = OryClient.const_get(type)
    klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
  end
end

#_to_hash(value) ⇒ Hash

Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value

Parameters:

  • value (Object)

    Any valid value

Returns:

  • (Hash)

    Returns the value in the form of hash



874
875
876
877
878
879
880
881
882
883
884
885
886
# File 'lib/ory-client/models/o_auth2_client.rb', line 874

def _to_hash(value)
  if value.is_a?(Array)
    value.compact.map { |v| _to_hash(v) }
  elsif value.is_a?(Hash)
    {}.tap do |hash|
      value.each { |k, v| hash[k] = _to_hash(v) }
    end
  elsif value.respond_to? :to_hash
    value.to_hash
  else
    value
  end
end

#build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
# File 'lib/ory-client/models/o_auth2_client.rb', line 779

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  attributes = attributes.transform_keys(&:to_sym)
  self.class.openapi_types.each_pair do |key, type|
    if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
      self.send("#{key}=", nil)
    elsif type =~ /\AArray<(.*)>/i
      # check to ensure the input is an array given that the attribute
      # is documented as an array but the input is not
      if attributes[self.class.attribute_map[key]].is_a?(Array)
        self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
      end
    elsif !attributes[self.class.attribute_map[key]].nil?
      self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
    end
  end

  self
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


759
760
761
# File 'lib/ory-client/models/o_auth2_client.rb', line 759

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



765
766
767
# File 'lib/ory-client/models/o_auth2_client.rb', line 765

def hash
  [allowed_cors_origins, audience, authorization_code_grant_access_token_lifespan, authorization_code_grant_id_token_lifespan, authorization_code_grant_refresh_token_lifespan, backchannel_logout_session_required, backchannel_logout_uri, client_credentials_grant_access_token_lifespan, client_id, client_name, client_secret, client_secret_expires_at, client_uri, contacts, created_at, frontchannel_logout_session_required, frontchannel_logout_uri, grant_types, implicit_grant_access_token_lifespan, implicit_grant_id_token_lifespan, jwks, jwks_uri, jwt_bearer_grant_access_token_lifespan, logo_uri, , owner, password_grant_access_token_lifespan, password_grant_refresh_token_lifespan, policy_uri, post_logout_redirect_uris, redirect_uris, refresh_token_grant_access_token_lifespan, refresh_token_grant_id_token_lifespan, refresh_token_grant_refresh_token_lifespan, registration_access_token, registration_client_uri, request_object_signing_alg, request_uris, response_types, scope, sector_identifier_uri, subject_type, token_endpoint_auth_method, token_endpoint_auth_signing_alg, tos_uri, updated_at, userinfo_signed_response_alg].hash
end

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



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
# File 'lib/ory-client/models/o_auth2_client.rb', line 488

def list_invalid_properties
  invalid_properties = Array.new
  pattern = Regexp.new(/^[0-9]+(ns|us|ms|s|m|h)$/)
  if !@authorization_code_grant_access_token_lifespan.nil? && @authorization_code_grant_access_token_lifespan !~ pattern
    invalid_properties.push("invalid value for \"authorization_code_grant_access_token_lifespan\", must conform to the pattern #{pattern}.")
  end

  pattern = Regexp.new(/^[0-9]+(ns|us|ms|s|m|h)$/)
  if !@authorization_code_grant_id_token_lifespan.nil? && @authorization_code_grant_id_token_lifespan !~ pattern
    invalid_properties.push("invalid value for \"authorization_code_grant_id_token_lifespan\", must conform to the pattern #{pattern}.")
  end

  pattern = Regexp.new(/^[0-9]+(ns|us|ms|s|m|h)$/)
  if !@authorization_code_grant_refresh_token_lifespan.nil? && @authorization_code_grant_refresh_token_lifespan !~ pattern
    invalid_properties.push("invalid value for \"authorization_code_grant_refresh_token_lifespan\", must conform to the pattern #{pattern}.")
  end

  pattern = Regexp.new(/^[0-9]+(ns|us|ms|s|m|h)$/)
  if !@client_credentials_grant_access_token_lifespan.nil? && @client_credentials_grant_access_token_lifespan !~ pattern
    invalid_properties.push("invalid value for \"client_credentials_grant_access_token_lifespan\", must conform to the pattern #{pattern}.")
  end

  pattern = Regexp.new(/^[0-9]+(ns|us|ms|s|m|h)$/)
  if !@implicit_grant_access_token_lifespan.nil? && @implicit_grant_access_token_lifespan !~ pattern
    invalid_properties.push("invalid value for \"implicit_grant_access_token_lifespan\", must conform to the pattern #{pattern}.")
  end

  pattern = Regexp.new(/^[0-9]+(ns|us|ms|s|m|h)$/)
  if !@implicit_grant_id_token_lifespan.nil? && @implicit_grant_id_token_lifespan !~ pattern
    invalid_properties.push("invalid value for \"implicit_grant_id_token_lifespan\", must conform to the pattern #{pattern}.")
  end

  pattern = Regexp.new(/^[0-9]+(ns|us|ms|s|m|h)$/)
  if !@jwt_bearer_grant_access_token_lifespan.nil? && @jwt_bearer_grant_access_token_lifespan !~ pattern
    invalid_properties.push("invalid value for \"jwt_bearer_grant_access_token_lifespan\", must conform to the pattern #{pattern}.")
  end

  pattern = Regexp.new(/^[0-9]+(ns|us|ms|s|m|h)$/)
  if !@password_grant_access_token_lifespan.nil? && @password_grant_access_token_lifespan !~ pattern
    invalid_properties.push("invalid value for \"password_grant_access_token_lifespan\", must conform to the pattern #{pattern}.")
  end

  pattern = Regexp.new(/^[0-9]+(ns|us|ms|s|m|h)$/)
  if !@password_grant_refresh_token_lifespan.nil? && @password_grant_refresh_token_lifespan !~ pattern
    invalid_properties.push("invalid value for \"password_grant_refresh_token_lifespan\", must conform to the pattern #{pattern}.")
  end

  pattern = Regexp.new(/^[0-9]+(ns|us|ms|s|m|h)$/)
  if !@refresh_token_grant_access_token_lifespan.nil? && @refresh_token_grant_access_token_lifespan !~ pattern
    invalid_properties.push("invalid value for \"refresh_token_grant_access_token_lifespan\", must conform to the pattern #{pattern}.")
  end

  pattern = Regexp.new(/^[0-9]+(ns|us|ms|s|m|h)$/)
  if !@refresh_token_grant_id_token_lifespan.nil? && @refresh_token_grant_id_token_lifespan !~ pattern
    invalid_properties.push("invalid value for \"refresh_token_grant_id_token_lifespan\", must conform to the pattern #{pattern}.")
  end

  pattern = Regexp.new(/^[0-9]+(ns|us|ms|s|m|h)$/)
  if !@refresh_token_grant_refresh_token_lifespan.nil? && @refresh_token_grant_refresh_token_lifespan !~ pattern
    invalid_properties.push("invalid value for \"refresh_token_grant_refresh_token_lifespan\", must conform to the pattern #{pattern}.")
  end

  invalid_properties
end

#to_bodyHash

to_body is an alias to to_hash (backward compatibility)

Returns:

  • (Hash)

    Returns the object in the form of hash



850
851
852
# File 'lib/ory-client/models/o_auth2_client.rb', line 850

def to_body
  to_hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



856
857
858
859
860
861
862
863
864
865
866
867
868
# File 'lib/ory-client/models/o_auth2_client.rb', line 856

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = self.send(attr)
    if value.nil?
      is_nullable = self.class.openapi_nullable.include?(attr)
      next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
    end

    hash[param] = _to_hash(value)
  end
  hash
end

#to_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



844
845
846
# File 'lib/ory-client/models/o_auth2_client.rb', line 844

def to_s
  to_hash.to_s
end

#valid?Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean)

    true if the model is valid



555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
# File 'lib/ory-client/models/o_auth2_client.rb', line 555

def valid?
  return false if !@authorization_code_grant_access_token_lifespan.nil? && @authorization_code_grant_access_token_lifespan !~ Regexp.new(/^[0-9]+(ns|us|ms|s|m|h)$/)
  return false if !@authorization_code_grant_id_token_lifespan.nil? && @authorization_code_grant_id_token_lifespan !~ Regexp.new(/^[0-9]+(ns|us|ms|s|m|h)$/)
  return false if !@authorization_code_grant_refresh_token_lifespan.nil? && @authorization_code_grant_refresh_token_lifespan !~ Regexp.new(/^[0-9]+(ns|us|ms|s|m|h)$/)
  return false if !@client_credentials_grant_access_token_lifespan.nil? && @client_credentials_grant_access_token_lifespan !~ Regexp.new(/^[0-9]+(ns|us|ms|s|m|h)$/)
  return false if !@implicit_grant_access_token_lifespan.nil? && @implicit_grant_access_token_lifespan !~ Regexp.new(/^[0-9]+(ns|us|ms|s|m|h)$/)
  return false if !@implicit_grant_id_token_lifespan.nil? && @implicit_grant_id_token_lifespan !~ Regexp.new(/^[0-9]+(ns|us|ms|s|m|h)$/)
  return false if !@jwt_bearer_grant_access_token_lifespan.nil? && @jwt_bearer_grant_access_token_lifespan !~ Regexp.new(/^[0-9]+(ns|us|ms|s|m|h)$/)
  return false if !@password_grant_access_token_lifespan.nil? && @password_grant_access_token_lifespan !~ Regexp.new(/^[0-9]+(ns|us|ms|s|m|h)$/)
  return false if !@password_grant_refresh_token_lifespan.nil? && @password_grant_refresh_token_lifespan !~ Regexp.new(/^[0-9]+(ns|us|ms|s|m|h)$/)
  return false if !@refresh_token_grant_access_token_lifespan.nil? && @refresh_token_grant_access_token_lifespan !~ Regexp.new(/^[0-9]+(ns|us|ms|s|m|h)$/)
  return false if !@refresh_token_grant_id_token_lifespan.nil? && @refresh_token_grant_id_token_lifespan !~ Regexp.new(/^[0-9]+(ns|us|ms|s|m|h)$/)
  return false if !@refresh_token_grant_refresh_token_lifespan.nil? && @refresh_token_grant_refresh_token_lifespan !~ Regexp.new(/^[0-9]+(ns|us|ms|s|m|h)$/)
  true
end