ory-hydra-client 0.0.0.alpha39

Sign up to get free protection for your applications and to get access to all the features.
Files changed (92) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +165 -0
  4. data/Rakefile +10 -0
  5. data/docs/AcceptConsentRequest.md +25 -0
  6. data/docs/AcceptLoginRequest.md +27 -0
  7. data/docs/AdminApi.md +1443 -0
  8. data/docs/CompletedRequest.md +17 -0
  9. data/docs/ConsentRequest.md +39 -0
  10. data/docs/ConsentRequestSession.md +19 -0
  11. data/docs/FlushInactiveOAuth2TokensRequest.md +17 -0
  12. data/docs/GenericError.md +23 -0
  13. data/docs/HealthNotReadyStatus.md +17 -0
  14. data/docs/HealthStatus.md +17 -0
  15. data/docs/JSONWebKey.md +49 -0
  16. data/docs/JSONWebKeySet.md +17 -0
  17. data/docs/JsonWebKeySetGeneratorRequest.md +21 -0
  18. data/docs/LoginRequest.md +33 -0
  19. data/docs/LogoutRequest.md +23 -0
  20. data/docs/OAuth2Client.md +79 -0
  21. data/docs/OAuth2TokenIntrospection.md +41 -0
  22. data/docs/Oauth2TokenResponse.md +27 -0
  23. data/docs/OauthTokenResponse.md +27 -0
  24. data/docs/OpenIDConnectContext.md +25 -0
  25. data/docs/PreviousConsentSession.md +27 -0
  26. data/docs/PublicApi.md +398 -0
  27. data/docs/RejectRequest.md +25 -0
  28. data/docs/UserinfoResponse.md +53 -0
  29. data/docs/Version.md +17 -0
  30. data/docs/WellKnown.md +65 -0
  31. data/lib/ory-hydra-client.rb +65 -0
  32. data/lib/ory-hydra-client/api/admin_api.rb +1879 -0
  33. data/lib/ory-hydra-client/api/public_api.rb +498 -0
  34. data/lib/ory-hydra-client/api_client.rb +386 -0
  35. data/lib/ory-hydra-client/api_error.rb +57 -0
  36. data/lib/ory-hydra-client/configuration.rb +255 -0
  37. data/lib/ory-hydra-client/models/accept_consent_request.rb +250 -0
  38. data/lib/ory-hydra-client/models/accept_login_request.rb +264 -0
  39. data/lib/ory-hydra-client/models/completed_request.rb +207 -0
  40. data/lib/ory-hydra-client/models/consent_request.rb +321 -0
  41. data/lib/ory-hydra-client/models/consent_request_session.rb +221 -0
  42. data/lib/ory-hydra-client/models/flush_inactive_o_auth2_tokens_request.rb +207 -0
  43. data/lib/ory-hydra-client/models/generic_error.rb +243 -0
  44. data/lib/ory-hydra-client/models/health_not_ready_status.rb +209 -0
  45. data/lib/ory-hydra-client/models/health_status.rb +207 -0
  46. data/lib/ory-hydra-client/models/json_web_key.rb +377 -0
  47. data/lib/ory-hydra-client/models/json_web_key_set.rb +209 -0
  48. data/lib/ory-hydra-client/models/json_web_key_set_generator_request.rb +242 -0
  49. data/lib/ory-hydra-client/models/login_request.rb +289 -0
  50. data/lib/ory-hydra-client/models/logout_request.rb +237 -0
  51. data/lib/ory-hydra-client/models/o_auth2_client.rb +551 -0
  52. data/lib/ory-hydra-client/models/o_auth2_token_introspection.rb +337 -0
  53. data/lib/ory-hydra-client/models/oauth2_token_response.rb +252 -0
  54. data/lib/ory-hydra-client/models/oauth_token_response.rb +258 -0
  55. data/lib/ory-hydra-client/models/open_id_connect_context.rb +253 -0
  56. data/lib/ory-hydra-client/models/previous_consent_session.rb +260 -0
  57. data/lib/ory-hydra-client/models/reject_request.rb +242 -0
  58. data/lib/ory-hydra-client/models/userinfo_response.rb +388 -0
  59. data/lib/ory-hydra-client/models/version.rb +207 -0
  60. data/lib/ory-hydra-client/models/well_known.rb +501 -0
  61. data/lib/ory-hydra-client/version.rb +15 -0
  62. data/ory-hydra-client.gemspec +39 -0
  63. data/spec/api/admin_api_spec.rb +395 -0
  64. data/spec/api/public_api_spec.rb +129 -0
  65. data/spec/api_client_spec.rb +226 -0
  66. data/spec/configuration_spec.rb +42 -0
  67. data/spec/models/accept_consent_request_spec.rb +65 -0
  68. data/spec/models/accept_login_request_spec.rb +71 -0
  69. data/spec/models/completed_request_spec.rb +41 -0
  70. data/spec/models/consent_request_session_spec.rb +47 -0
  71. data/spec/models/consent_request_spec.rb +107 -0
  72. data/spec/models/flush_inactive_o_auth2_tokens_request_spec.rb +41 -0
  73. data/spec/models/generic_error_spec.rb +59 -0
  74. data/spec/models/health_not_ready_status_spec.rb +41 -0
  75. data/spec/models/health_status_spec.rb +41 -0
  76. data/spec/models/json_web_key_set_generator_request_spec.rb +53 -0
  77. data/spec/models/json_web_key_set_spec.rb +41 -0
  78. data/spec/models/json_web_key_spec.rb +137 -0
  79. data/spec/models/login_request_spec.rb +89 -0
  80. data/spec/models/logout_request_spec.rb +59 -0
  81. data/spec/models/o_auth2_client_spec.rb +227 -0
  82. data/spec/models/o_auth2_token_introspection_spec.rb +113 -0
  83. data/spec/models/oauth2_token_response_spec.rb +71 -0
  84. data/spec/models/oauth_token_response_spec.rb +71 -0
  85. data/spec/models/open_id_connect_context_spec.rb +65 -0
  86. data/spec/models/previous_consent_session_spec.rb +71 -0
  87. data/spec/models/reject_request_spec.rb +65 -0
  88. data/spec/models/userinfo_response_spec.rb +149 -0
  89. data/spec/models/version_spec.rb +41 -0
  90. data/spec/models/well_known_spec.rb +185 -0
  91. data/spec/spec_helper.rb +111 -0
  92. metadata +223 -0
@@ -0,0 +1,501 @@
1
+ =begin
2
+ #ORY Hydra
3
+
4
+ #Welcome to the ORY Hydra HTTP API documentation. You will find documentation for all HTTP APIs here.
5
+
6
+ The version of the OpenAPI document: v0.0.0-alpha.39
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.2.2
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module OryHydraClient
16
+ # It includes links to several endpoints (e.g. /oauth2/token) and exposes information on supported signature algorithms among others.
17
+ class WellKnown
18
+ # URL of the OP's OAuth 2.0 Authorization Endpoint.
19
+ attr_accessor :authorization_endpoint
20
+
21
+ # Boolean value specifying whether the OP can pass a sid (session ID) Claim in the Logout Token to identify the RP session with the OP. If supported, the sid Claim is also included in ID Tokens issued by the OP
22
+ attr_accessor :backchannel_logout_session_supported
23
+
24
+ # Boolean value specifying whether the OP supports back-channel logout, with true indicating support.
25
+ attr_accessor :backchannel_logout_supported
26
+
27
+ # Boolean value specifying whether the OP supports use of the claims parameter, with true indicating support.
28
+ attr_accessor :claims_parameter_supported
29
+
30
+ # JSON array containing a list of the Claim Names of the Claims that the OpenID Provider MAY be able to supply values for. Note that for privacy or other reasons, this might not be an exhaustive list.
31
+ attr_accessor :claims_supported
32
+
33
+ # URL at the OP to which an RP can perform a redirect to request that the End-User be logged out at the OP.
34
+ attr_accessor :end_session_endpoint
35
+
36
+ # Boolean value specifying whether the OP can pass iss (issuer) and sid (session ID) query parameters to identify the RP session with the OP when the frontchannel_logout_uri is used. If supported, the sid Claim is also included in ID Tokens issued by the OP.
37
+ attr_accessor :frontchannel_logout_session_supported
38
+
39
+ # Boolean value specifying whether the OP supports HTTP-based logout, with true indicating support.
40
+ attr_accessor :frontchannel_logout_supported
41
+
42
+ # JSON array containing a list of the OAuth 2.0 Grant Type values that this OP supports.
43
+ attr_accessor :grant_types_supported
44
+
45
+ # JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT.
46
+ attr_accessor :id_token_signing_alg_values_supported
47
+
48
+ # URL using the https scheme with no query or fragment component that the OP asserts as its IssuerURL Identifier. If IssuerURL discovery is supported , this value MUST be identical to the issuer value returned by WebFinger. This also MUST be identical to the iss Claim value in ID Tokens issued from this IssuerURL.
49
+ attr_accessor :issuer
50
+
51
+ # URL of the OP's JSON Web Key Set [JWK] document. This contains the signing key(s) the RP uses to validate signatures from the OP. The JWK Set MAY also contain the Server's encryption key(s), which are used by RPs to encrypt requests to the Server. 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.
52
+ attr_accessor :jwks_uri
53
+
54
+ # URL of the OP's Dynamic Client Registration Endpoint.
55
+ attr_accessor :registration_endpoint
56
+
57
+ # Boolean value specifying whether the OP supports use of the request parameter, with true indicating support.
58
+ attr_accessor :request_parameter_supported
59
+
60
+ # Boolean value specifying whether the OP supports use of the request_uri parameter, with true indicating support.
61
+ attr_accessor :request_uri_parameter_supported
62
+
63
+ # Boolean value specifying whether the OP requires any request_uri values used to be pre-registered using the request_uris registration parameter.
64
+ attr_accessor :require_request_uri_registration
65
+
66
+ # JSON array containing a list of the OAuth 2.0 response_mode values that this OP supports.
67
+ attr_accessor :response_modes_supported
68
+
69
+ # JSON array containing a list of the OAuth 2.0 response_type values that this OP supports. Dynamic OpenID Providers MUST support the code, id_token, and the token id_token Response Type values.
70
+ attr_accessor :response_types_supported
71
+
72
+ # URL of the authorization server's OAuth 2.0 revocation endpoint.
73
+ attr_accessor :revocation_endpoint
74
+
75
+ # SON array containing a list of the OAuth 2.0 [RFC6749] scope values that this server supports. The server MUST support the openid scope value. Servers MAY choose not to advertise some supported scope values even when this parameter is used
76
+ attr_accessor :scopes_supported
77
+
78
+ # JSON array containing a list of the Subject Identifier types that this OP supports. Valid types include pairwise and public.
79
+ attr_accessor :subject_types_supported
80
+
81
+ # URL of the OP's OAuth 2.0 Token Endpoint
82
+ attr_accessor :token_endpoint
83
+
84
+ # JSON array containing a list of Client Authentication methods supported by this Token Endpoint. The options are client_secret_post, client_secret_basic, client_secret_jwt, and private_key_jwt, as described in Section 9 of OpenID Connect Core 1.0
85
+ attr_accessor :token_endpoint_auth_methods_supported
86
+
87
+ # URL of the OP's UserInfo Endpoint.
88
+ attr_accessor :userinfo_endpoint
89
+
90
+ # JSON array containing a list of the JWS [JWS] signing algorithms (alg values) [JWA] supported by the UserInfo Endpoint to encode the Claims in a JWT [JWT].
91
+ attr_accessor :userinfo_signing_alg_values_supported
92
+
93
+ # Attribute mapping from ruby-style variable name to JSON key.
94
+ def self.attribute_map
95
+ {
96
+ :'authorization_endpoint' => :'authorization_endpoint',
97
+ :'backchannel_logout_session_supported' => :'backchannel_logout_session_supported',
98
+ :'backchannel_logout_supported' => :'backchannel_logout_supported',
99
+ :'claims_parameter_supported' => :'claims_parameter_supported',
100
+ :'claims_supported' => :'claims_supported',
101
+ :'end_session_endpoint' => :'end_session_endpoint',
102
+ :'frontchannel_logout_session_supported' => :'frontchannel_logout_session_supported',
103
+ :'frontchannel_logout_supported' => :'frontchannel_logout_supported',
104
+ :'grant_types_supported' => :'grant_types_supported',
105
+ :'id_token_signing_alg_values_supported' => :'id_token_signing_alg_values_supported',
106
+ :'issuer' => :'issuer',
107
+ :'jwks_uri' => :'jwks_uri',
108
+ :'registration_endpoint' => :'registration_endpoint',
109
+ :'request_parameter_supported' => :'request_parameter_supported',
110
+ :'request_uri_parameter_supported' => :'request_uri_parameter_supported',
111
+ :'require_request_uri_registration' => :'require_request_uri_registration',
112
+ :'response_modes_supported' => :'response_modes_supported',
113
+ :'response_types_supported' => :'response_types_supported',
114
+ :'revocation_endpoint' => :'revocation_endpoint',
115
+ :'scopes_supported' => :'scopes_supported',
116
+ :'subject_types_supported' => :'subject_types_supported',
117
+ :'token_endpoint' => :'token_endpoint',
118
+ :'token_endpoint_auth_methods_supported' => :'token_endpoint_auth_methods_supported',
119
+ :'userinfo_endpoint' => :'userinfo_endpoint',
120
+ :'userinfo_signing_alg_values_supported' => :'userinfo_signing_alg_values_supported'
121
+ }
122
+ end
123
+
124
+ # Attribute type mapping.
125
+ def self.openapi_types
126
+ {
127
+ :'authorization_endpoint' => :'String',
128
+ :'backchannel_logout_session_supported' => :'Boolean',
129
+ :'backchannel_logout_supported' => :'Boolean',
130
+ :'claims_parameter_supported' => :'Boolean',
131
+ :'claims_supported' => :'Array<String>',
132
+ :'end_session_endpoint' => :'String',
133
+ :'frontchannel_logout_session_supported' => :'Boolean',
134
+ :'frontchannel_logout_supported' => :'Boolean',
135
+ :'grant_types_supported' => :'Array<String>',
136
+ :'id_token_signing_alg_values_supported' => :'Array<String>',
137
+ :'issuer' => :'String',
138
+ :'jwks_uri' => :'String',
139
+ :'registration_endpoint' => :'String',
140
+ :'request_parameter_supported' => :'Boolean',
141
+ :'request_uri_parameter_supported' => :'Boolean',
142
+ :'require_request_uri_registration' => :'Boolean',
143
+ :'response_modes_supported' => :'Array<String>',
144
+ :'response_types_supported' => :'Array<String>',
145
+ :'revocation_endpoint' => :'String',
146
+ :'scopes_supported' => :'Array<String>',
147
+ :'subject_types_supported' => :'Array<String>',
148
+ :'token_endpoint' => :'String',
149
+ :'token_endpoint_auth_methods_supported' => :'Array<String>',
150
+ :'userinfo_endpoint' => :'String',
151
+ :'userinfo_signing_alg_values_supported' => :'Array<String>'
152
+ }
153
+ end
154
+
155
+ # List of attributes with nullable: true
156
+ def self.openapi_nullable
157
+ Set.new([
158
+ ])
159
+ end
160
+
161
+ # Initializes the object
162
+ # @param [Hash] attributes Model attributes in the form of hash
163
+ def initialize(attributes = {})
164
+ if (!attributes.is_a?(Hash))
165
+ fail ArgumentError, "The input argument (attributes) must be a hash in `OryHydraClient::WellKnown` initialize method"
166
+ end
167
+
168
+ # check to see if the attribute exists and convert string to symbol for hash key
169
+ attributes = attributes.each_with_object({}) { |(k, v), h|
170
+ if (!self.class.attribute_map.key?(k.to_sym))
171
+ fail ArgumentError, "`#{k}` is not a valid attribute in `OryHydraClient::WellKnown`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
172
+ end
173
+ h[k.to_sym] = v
174
+ }
175
+
176
+ if attributes.key?(:'authorization_endpoint')
177
+ self.authorization_endpoint = attributes[:'authorization_endpoint']
178
+ end
179
+
180
+ if attributes.key?(:'backchannel_logout_session_supported')
181
+ self.backchannel_logout_session_supported = attributes[:'backchannel_logout_session_supported']
182
+ end
183
+
184
+ if attributes.key?(:'backchannel_logout_supported')
185
+ self.backchannel_logout_supported = attributes[:'backchannel_logout_supported']
186
+ end
187
+
188
+ if attributes.key?(:'claims_parameter_supported')
189
+ self.claims_parameter_supported = attributes[:'claims_parameter_supported']
190
+ end
191
+
192
+ if attributes.key?(:'claims_supported')
193
+ if (value = attributes[:'claims_supported']).is_a?(Array)
194
+ self.claims_supported = value
195
+ end
196
+ end
197
+
198
+ if attributes.key?(:'end_session_endpoint')
199
+ self.end_session_endpoint = attributes[:'end_session_endpoint']
200
+ end
201
+
202
+ if attributes.key?(:'frontchannel_logout_session_supported')
203
+ self.frontchannel_logout_session_supported = attributes[:'frontchannel_logout_session_supported']
204
+ end
205
+
206
+ if attributes.key?(:'frontchannel_logout_supported')
207
+ self.frontchannel_logout_supported = attributes[:'frontchannel_logout_supported']
208
+ end
209
+
210
+ if attributes.key?(:'grant_types_supported')
211
+ if (value = attributes[:'grant_types_supported']).is_a?(Array)
212
+ self.grant_types_supported = value
213
+ end
214
+ end
215
+
216
+ if attributes.key?(:'id_token_signing_alg_values_supported')
217
+ if (value = attributes[:'id_token_signing_alg_values_supported']).is_a?(Array)
218
+ self.id_token_signing_alg_values_supported = value
219
+ end
220
+ end
221
+
222
+ if attributes.key?(:'issuer')
223
+ self.issuer = attributes[:'issuer']
224
+ end
225
+
226
+ if attributes.key?(:'jwks_uri')
227
+ self.jwks_uri = attributes[:'jwks_uri']
228
+ end
229
+
230
+ if attributes.key?(:'registration_endpoint')
231
+ self.registration_endpoint = attributes[:'registration_endpoint']
232
+ end
233
+
234
+ if attributes.key?(:'request_parameter_supported')
235
+ self.request_parameter_supported = attributes[:'request_parameter_supported']
236
+ end
237
+
238
+ if attributes.key?(:'request_uri_parameter_supported')
239
+ self.request_uri_parameter_supported = attributes[:'request_uri_parameter_supported']
240
+ end
241
+
242
+ if attributes.key?(:'require_request_uri_registration')
243
+ self.require_request_uri_registration = attributes[:'require_request_uri_registration']
244
+ end
245
+
246
+ if attributes.key?(:'response_modes_supported')
247
+ if (value = attributes[:'response_modes_supported']).is_a?(Array)
248
+ self.response_modes_supported = value
249
+ end
250
+ end
251
+
252
+ if attributes.key?(:'response_types_supported')
253
+ if (value = attributes[:'response_types_supported']).is_a?(Array)
254
+ self.response_types_supported = value
255
+ end
256
+ end
257
+
258
+ if attributes.key?(:'revocation_endpoint')
259
+ self.revocation_endpoint = attributes[:'revocation_endpoint']
260
+ end
261
+
262
+ if attributes.key?(:'scopes_supported')
263
+ if (value = attributes[:'scopes_supported']).is_a?(Array)
264
+ self.scopes_supported = value
265
+ end
266
+ end
267
+
268
+ if attributes.key?(:'subject_types_supported')
269
+ if (value = attributes[:'subject_types_supported']).is_a?(Array)
270
+ self.subject_types_supported = value
271
+ end
272
+ end
273
+
274
+ if attributes.key?(:'token_endpoint')
275
+ self.token_endpoint = attributes[:'token_endpoint']
276
+ end
277
+
278
+ if attributes.key?(:'token_endpoint_auth_methods_supported')
279
+ if (value = attributes[:'token_endpoint_auth_methods_supported']).is_a?(Array)
280
+ self.token_endpoint_auth_methods_supported = value
281
+ end
282
+ end
283
+
284
+ if attributes.key?(:'userinfo_endpoint')
285
+ self.userinfo_endpoint = attributes[:'userinfo_endpoint']
286
+ end
287
+
288
+ if attributes.key?(:'userinfo_signing_alg_values_supported')
289
+ if (value = attributes[:'userinfo_signing_alg_values_supported']).is_a?(Array)
290
+ self.userinfo_signing_alg_values_supported = value
291
+ end
292
+ end
293
+ end
294
+
295
+ # Show invalid properties with the reasons. Usually used together with valid?
296
+ # @return Array for valid properties with the reasons
297
+ def list_invalid_properties
298
+ invalid_properties = Array.new
299
+ if @authorization_endpoint.nil?
300
+ invalid_properties.push('invalid value for "authorization_endpoint", authorization_endpoint cannot be nil.')
301
+ end
302
+
303
+ if @id_token_signing_alg_values_supported.nil?
304
+ invalid_properties.push('invalid value for "id_token_signing_alg_values_supported", id_token_signing_alg_values_supported cannot be nil.')
305
+ end
306
+
307
+ if @issuer.nil?
308
+ invalid_properties.push('invalid value for "issuer", issuer cannot be nil.')
309
+ end
310
+
311
+ if @jwks_uri.nil?
312
+ invalid_properties.push('invalid value for "jwks_uri", jwks_uri cannot be nil.')
313
+ end
314
+
315
+ if @response_types_supported.nil?
316
+ invalid_properties.push('invalid value for "response_types_supported", response_types_supported cannot be nil.')
317
+ end
318
+
319
+ if @subject_types_supported.nil?
320
+ invalid_properties.push('invalid value for "subject_types_supported", subject_types_supported cannot be nil.')
321
+ end
322
+
323
+ if @token_endpoint.nil?
324
+ invalid_properties.push('invalid value for "token_endpoint", token_endpoint cannot be nil.')
325
+ end
326
+
327
+ invalid_properties
328
+ end
329
+
330
+ # Check to see if the all the properties in the model are valid
331
+ # @return true if the model is valid
332
+ def valid?
333
+ return false if @authorization_endpoint.nil?
334
+ return false if @id_token_signing_alg_values_supported.nil?
335
+ return false if @issuer.nil?
336
+ return false if @jwks_uri.nil?
337
+ return false if @response_types_supported.nil?
338
+ return false if @subject_types_supported.nil?
339
+ return false if @token_endpoint.nil?
340
+ true
341
+ end
342
+
343
+ # Checks equality by comparing each attribute.
344
+ # @param [Object] Object to be compared
345
+ def ==(o)
346
+ return true if self.equal?(o)
347
+ self.class == o.class &&
348
+ authorization_endpoint == o.authorization_endpoint &&
349
+ backchannel_logout_session_supported == o.backchannel_logout_session_supported &&
350
+ backchannel_logout_supported == o.backchannel_logout_supported &&
351
+ claims_parameter_supported == o.claims_parameter_supported &&
352
+ claims_supported == o.claims_supported &&
353
+ end_session_endpoint == o.end_session_endpoint &&
354
+ frontchannel_logout_session_supported == o.frontchannel_logout_session_supported &&
355
+ frontchannel_logout_supported == o.frontchannel_logout_supported &&
356
+ grant_types_supported == o.grant_types_supported &&
357
+ id_token_signing_alg_values_supported == o.id_token_signing_alg_values_supported &&
358
+ issuer == o.issuer &&
359
+ jwks_uri == o.jwks_uri &&
360
+ registration_endpoint == o.registration_endpoint &&
361
+ request_parameter_supported == o.request_parameter_supported &&
362
+ request_uri_parameter_supported == o.request_uri_parameter_supported &&
363
+ require_request_uri_registration == o.require_request_uri_registration &&
364
+ response_modes_supported == o.response_modes_supported &&
365
+ response_types_supported == o.response_types_supported &&
366
+ revocation_endpoint == o.revocation_endpoint &&
367
+ scopes_supported == o.scopes_supported &&
368
+ subject_types_supported == o.subject_types_supported &&
369
+ token_endpoint == o.token_endpoint &&
370
+ token_endpoint_auth_methods_supported == o.token_endpoint_auth_methods_supported &&
371
+ userinfo_endpoint == o.userinfo_endpoint &&
372
+ userinfo_signing_alg_values_supported == o.userinfo_signing_alg_values_supported
373
+ end
374
+
375
+ # @see the `==` method
376
+ # @param [Object] Object to be compared
377
+ def eql?(o)
378
+ self == o
379
+ end
380
+
381
+ # Calculates hash code according to all attributes.
382
+ # @return [Integer] Hash code
383
+ def hash
384
+ [authorization_endpoint, backchannel_logout_session_supported, backchannel_logout_supported, claims_parameter_supported, claims_supported, end_session_endpoint, frontchannel_logout_session_supported, frontchannel_logout_supported, grant_types_supported, id_token_signing_alg_values_supported, issuer, jwks_uri, registration_endpoint, request_parameter_supported, request_uri_parameter_supported, require_request_uri_registration, response_modes_supported, response_types_supported, revocation_endpoint, scopes_supported, subject_types_supported, token_endpoint, token_endpoint_auth_methods_supported, userinfo_endpoint, userinfo_signing_alg_values_supported].hash
385
+ end
386
+
387
+ # Builds the object from hash
388
+ # @param [Hash] attributes Model attributes in the form of hash
389
+ # @return [Object] Returns the model itself
390
+ def self.build_from_hash(attributes)
391
+ new.build_from_hash(attributes)
392
+ end
393
+
394
+ # Builds the object from hash
395
+ # @param [Hash] attributes Model attributes in the form of hash
396
+ # @return [Object] Returns the model itself
397
+ def build_from_hash(attributes)
398
+ return nil unless attributes.is_a?(Hash)
399
+ self.class.openapi_types.each_pair do |key, type|
400
+ if type =~ /\AArray<(.*)>/i
401
+ # check to ensure the input is an array given that the attribute
402
+ # is documented as an array but the input is not
403
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
404
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
405
+ end
406
+ elsif !attributes[self.class.attribute_map[key]].nil?
407
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
408
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
409
+ end
410
+
411
+ self
412
+ end
413
+
414
+ # Deserializes the data based on type
415
+ # @param string type Data type
416
+ # @param string value Value to be deserialized
417
+ # @return [Object] Deserialized data
418
+ def _deserialize(type, value)
419
+ case type.to_sym
420
+ when :DateTime
421
+ DateTime.parse(value)
422
+ when :Date
423
+ Date.parse(value)
424
+ when :String
425
+ value.to_s
426
+ when :Integer
427
+ value.to_i
428
+ when :Float
429
+ value.to_f
430
+ when :Boolean
431
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
432
+ true
433
+ else
434
+ false
435
+ end
436
+ when :Object
437
+ # generic object (usually a Hash), return directly
438
+ value
439
+ when /\AArray<(?<inner_type>.+)>\z/
440
+ inner_type = Regexp.last_match[:inner_type]
441
+ value.map { |v| _deserialize(inner_type, v) }
442
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
443
+ k_type = Regexp.last_match[:k_type]
444
+ v_type = Regexp.last_match[:v_type]
445
+ {}.tap do |hash|
446
+ value.each do |k, v|
447
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
448
+ end
449
+ end
450
+ else # model
451
+ OryHydraClient.const_get(type).build_from_hash(value)
452
+ end
453
+ end
454
+
455
+ # Returns the string representation of the object
456
+ # @return [String] String presentation of the object
457
+ def to_s
458
+ to_hash.to_s
459
+ end
460
+
461
+ # to_body is an alias to to_hash (backward compatibility)
462
+ # @return [Hash] Returns the object in the form of hash
463
+ def to_body
464
+ to_hash
465
+ end
466
+
467
+ # Returns the object in the form of hash
468
+ # @return [Hash] Returns the object in the form of hash
469
+ def to_hash
470
+ hash = {}
471
+ self.class.attribute_map.each_pair do |attr, param|
472
+ value = self.send(attr)
473
+ if value.nil?
474
+ is_nullable = self.class.openapi_nullable.include?(attr)
475
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
476
+ end
477
+
478
+ hash[param] = _to_hash(value)
479
+ end
480
+ hash
481
+ end
482
+
483
+ # Outputs non-array value in the form of hash
484
+ # For object, use to_hash. Otherwise, just return the value
485
+ # @param [Object] value Any valid value
486
+ # @return [Hash] Returns the value in the form of hash
487
+ def _to_hash(value)
488
+ if value.is_a?(Array)
489
+ value.compact.map { |v| _to_hash(v) }
490
+ elsif value.is_a?(Hash)
491
+ {}.tap do |hash|
492
+ value.each { |k, v| hash[k] = _to_hash(v) }
493
+ end
494
+ elsif value.respond_to? :to_hash
495
+ value.to_hash
496
+ else
497
+ value
498
+ end
499
+ end
500
+ end
501
+ end