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,498 @@
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 'cgi'
14
+
15
+ module OryHydraClient
16
+ class PublicApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # OpenID Connect Front-Backchannel enabled Logout
23
+ # This endpoint initiates and completes user logout at ORY Hydra and initiates OpenID Connect Front-/Back-channel logout: https://openid.net/specs/openid-connect-frontchannel-1_0.html https://openid.net/specs/openid-connect-backchannel-1_0.html
24
+ # @param [Hash] opts the optional parameters
25
+ # @return [nil]
26
+ def disconnect_user(opts = {})
27
+ disconnect_user_with_http_info(opts)
28
+ nil
29
+ end
30
+
31
+ # OpenID Connect Front-Backchannel enabled Logout
32
+ # This endpoint initiates and completes user logout at ORY Hydra and initiates OpenID Connect Front-/Back-channel logout: https://openid.net/specs/openid-connect-frontchannel-1_0.html https://openid.net/specs/openid-connect-backchannel-1_0.html
33
+ # @param [Hash] opts the optional parameters
34
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
35
+ def disconnect_user_with_http_info(opts = {})
36
+ if @api_client.config.debugging
37
+ @api_client.config.logger.debug 'Calling API: PublicApi.disconnect_user ...'
38
+ end
39
+ # resource path
40
+ local_var_path = '/oauth2/sessions/logout'
41
+
42
+ # query parameters
43
+ query_params = opts[:query_params] || {}
44
+
45
+ # header parameters
46
+ header_params = opts[:header_params] || {}
47
+
48
+ # form parameters
49
+ form_params = opts[:form_params] || {}
50
+
51
+ # http body (model)
52
+ post_body = opts[:body]
53
+
54
+ # return_type
55
+ return_type = opts[:return_type]
56
+
57
+ # auth_names
58
+ auth_names = opts[:auth_names] || []
59
+
60
+ new_options = opts.merge(
61
+ :header_params => header_params,
62
+ :query_params => query_params,
63
+ :form_params => form_params,
64
+ :body => post_body,
65
+ :auth_names => auth_names,
66
+ :return_type => return_type
67
+ )
68
+
69
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
70
+ if @api_client.config.debugging
71
+ @api_client.config.logger.debug "API called: PublicApi#disconnect_user\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
72
+ end
73
+ return data, status_code, headers
74
+ end
75
+
76
+ # OpenID Connect Discovery
77
+ # The well known endpoint an be used to retrieve information for OpenID Connect clients. We encourage you to not roll your own OpenID Connect client but to use an OpenID Connect client library instead. You can learn more on this flow at https://openid.net/specs/openid-connect-discovery-1_0.html . Popular libraries for OpenID Connect clients include oidc-client-js (JavaScript), go-oidc (Golang), and others. For a full list of clients go here: https://openid.net/developers/certified/
78
+ # @param [Hash] opts the optional parameters
79
+ # @return [WellKnown]
80
+ def discover_open_id_configuration(opts = {})
81
+ data, _status_code, _headers = discover_open_id_configuration_with_http_info(opts)
82
+ data
83
+ end
84
+
85
+ # OpenID Connect Discovery
86
+ # The well known endpoint an be used to retrieve information for OpenID Connect clients. We encourage you to not roll your own OpenID Connect client but to use an OpenID Connect client library instead. You can learn more on this flow at https://openid.net/specs/openid-connect-discovery-1_0.html . Popular libraries for OpenID Connect clients include oidc-client-js (JavaScript), go-oidc (Golang), and others. For a full list of clients go here: https://openid.net/developers/certified/
87
+ # @param [Hash] opts the optional parameters
88
+ # @return [Array<(WellKnown, Integer, Hash)>] WellKnown data, response status code and response headers
89
+ def discover_open_id_configuration_with_http_info(opts = {})
90
+ if @api_client.config.debugging
91
+ @api_client.config.logger.debug 'Calling API: PublicApi.discover_open_id_configuration ...'
92
+ end
93
+ # resource path
94
+ local_var_path = '/.well-known/openid-configuration'
95
+
96
+ # query parameters
97
+ query_params = opts[:query_params] || {}
98
+
99
+ # header parameters
100
+ header_params = opts[:header_params] || {}
101
+ # HTTP header 'Accept' (if needed)
102
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
103
+
104
+ # form parameters
105
+ form_params = opts[:form_params] || {}
106
+
107
+ # http body (model)
108
+ post_body = opts[:body]
109
+
110
+ # return_type
111
+ return_type = opts[:return_type] || 'WellKnown'
112
+
113
+ # auth_names
114
+ auth_names = opts[:auth_names] || []
115
+
116
+ new_options = opts.merge(
117
+ :header_params => header_params,
118
+ :query_params => query_params,
119
+ :form_params => form_params,
120
+ :body => post_body,
121
+ :auth_names => auth_names,
122
+ :return_type => return_type
123
+ )
124
+
125
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
126
+ if @api_client.config.debugging
127
+ @api_client.config.logger.debug "API called: PublicApi#discover_open_id_configuration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
128
+ end
129
+ return data, status_code, headers
130
+ end
131
+
132
+ # Check readiness status
133
+ # This endpoint returns a 200 status code when the HTTP server is up running and the environment dependencies (e.g. the database) are responsive as well. If the service supports TLS Edge Termination, this endpoint does not require the `X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance.
134
+ # @param [Hash] opts the optional parameters
135
+ # @return [HealthStatus]
136
+ def is_instance_ready(opts = {})
137
+ data, _status_code, _headers = is_instance_ready_with_http_info(opts)
138
+ data
139
+ end
140
+
141
+ # Check readiness status
142
+ # This endpoint returns a 200 status code when the HTTP server is up running and the environment dependencies (e.g. the database) are responsive as well. If the service supports TLS Edge Termination, this endpoint does not require the &#x60;X-Forwarded-Proto&#x60; header to be set. Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance.
143
+ # @param [Hash] opts the optional parameters
144
+ # @return [Array<(HealthStatus, Integer, Hash)>] HealthStatus data, response status code and response headers
145
+ def is_instance_ready_with_http_info(opts = {})
146
+ if @api_client.config.debugging
147
+ @api_client.config.logger.debug 'Calling API: PublicApi.is_instance_ready ...'
148
+ end
149
+ # resource path
150
+ local_var_path = '/health/ready'
151
+
152
+ # query parameters
153
+ query_params = opts[:query_params] || {}
154
+
155
+ # header parameters
156
+ header_params = opts[:header_params] || {}
157
+ # HTTP header 'Accept' (if needed)
158
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
159
+
160
+ # form parameters
161
+ form_params = opts[:form_params] || {}
162
+
163
+ # http body (model)
164
+ post_body = opts[:body]
165
+
166
+ # return_type
167
+ return_type = opts[:return_type] || 'HealthStatus'
168
+
169
+ # auth_names
170
+ auth_names = opts[:auth_names] || []
171
+
172
+ new_options = opts.merge(
173
+ :header_params => header_params,
174
+ :query_params => query_params,
175
+ :form_params => form_params,
176
+ :body => post_body,
177
+ :auth_names => auth_names,
178
+ :return_type => return_type
179
+ )
180
+
181
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
182
+ if @api_client.config.debugging
183
+ @api_client.config.logger.debug "API called: PublicApi#is_instance_ready\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
184
+ end
185
+ return data, status_code, headers
186
+ end
187
+
188
+ # The OAuth 2.0 token endpoint
189
+ # The client makes a request to the token endpoint by sending the following parameters using the \"application/x-www-form-urlencoded\" HTTP request entity-body. > Do not implement a client for this endpoint yourself. Use a library. There are many libraries > available for any programming language. You can find a list of libraries here: https://oauth.net/code/ > > Do not the the Hydra SDK does not implement this endpoint properly. Use one of the libraries listed above!
190
+ # @param grant_type [String]
191
+ # @param [Hash] opts the optional parameters
192
+ # @option opts [String] :code
193
+ # @option opts [String] :refresh_token
194
+ # @option opts [String] :redirect_uri
195
+ # @option opts [String] :client_id
196
+ # @return [Oauth2TokenResponse]
197
+ def oauth2_token(grant_type, opts = {})
198
+ data, _status_code, _headers = oauth2_token_with_http_info(grant_type, opts)
199
+ data
200
+ end
201
+
202
+ # The OAuth 2.0 token endpoint
203
+ # The client makes a request to the token endpoint by sending the following parameters using the \&quot;application/x-www-form-urlencoded\&quot; HTTP request entity-body. &gt; Do not implement a client for this endpoint yourself. Use a library. There are many libraries &gt; available for any programming language. You can find a list of libraries here: https://oauth.net/code/ &gt; &gt; Do not the the Hydra SDK does not implement this endpoint properly. Use one of the libraries listed above!
204
+ # @param grant_type [String]
205
+ # @param [Hash] opts the optional parameters
206
+ # @option opts [String] :code
207
+ # @option opts [String] :refresh_token
208
+ # @option opts [String] :redirect_uri
209
+ # @option opts [String] :client_id
210
+ # @return [Array<(Oauth2TokenResponse, Integer, Hash)>] Oauth2TokenResponse data, response status code and response headers
211
+ def oauth2_token_with_http_info(grant_type, opts = {})
212
+ if @api_client.config.debugging
213
+ @api_client.config.logger.debug 'Calling API: PublicApi.oauth2_token ...'
214
+ end
215
+ # verify the required parameter 'grant_type' is set
216
+ if @api_client.config.client_side_validation && grant_type.nil?
217
+ fail ArgumentError, "Missing the required parameter 'grant_type' when calling PublicApi.oauth2_token"
218
+ end
219
+ # resource path
220
+ local_var_path = '/oauth2/token'
221
+
222
+ # query parameters
223
+ query_params = opts[:query_params] || {}
224
+
225
+ # header parameters
226
+ header_params = opts[:header_params] || {}
227
+ # HTTP header 'Accept' (if needed)
228
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
229
+ # HTTP header 'Content-Type'
230
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
231
+
232
+ # form parameters
233
+ form_params = opts[:form_params] || {}
234
+ form_params['grant_type'] = grant_type
235
+ form_params['code'] = opts[:'code'] if !opts[:'code'].nil?
236
+ form_params['refresh_token'] = opts[:'refresh_token'] if !opts[:'refresh_token'].nil?
237
+ form_params['redirect_uri'] = opts[:'redirect_uri'] if !opts[:'redirect_uri'].nil?
238
+ form_params['client_id'] = opts[:'client_id'] if !opts[:'client_id'].nil?
239
+
240
+ # http body (model)
241
+ post_body = opts[:body]
242
+
243
+ # return_type
244
+ return_type = opts[:return_type] || 'Oauth2TokenResponse'
245
+
246
+ # auth_names
247
+ auth_names = opts[:auth_names] || ['basic', 'oauth2']
248
+
249
+ new_options = opts.merge(
250
+ :header_params => header_params,
251
+ :query_params => query_params,
252
+ :form_params => form_params,
253
+ :body => post_body,
254
+ :auth_names => auth_names,
255
+ :return_type => return_type
256
+ )
257
+
258
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
259
+ if @api_client.config.debugging
260
+ @api_client.config.logger.debug "API called: PublicApi#oauth2_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
261
+ end
262
+ return data, status_code, headers
263
+ end
264
+
265
+ # The OAuth 2.0 authorize endpoint
266
+ # This endpoint is not documented here because you should never use your own implementation to perform OAuth2 flows. OAuth2 is a very popular protocol and a library for your programming language will exists. To learn more about this flow please refer to the specification: https://tools.ietf.org/html/rfc6749
267
+ # @param [Hash] opts the optional parameters
268
+ # @return [nil]
269
+ def oauth_auth(opts = {})
270
+ oauth_auth_with_http_info(opts)
271
+ nil
272
+ end
273
+
274
+ # The OAuth 2.0 authorize endpoint
275
+ # This endpoint is not documented here because you should never use your own implementation to perform OAuth2 flows. OAuth2 is a very popular protocol and a library for your programming language will exists. To learn more about this flow please refer to the specification: https://tools.ietf.org/html/rfc6749
276
+ # @param [Hash] opts the optional parameters
277
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
278
+ def oauth_auth_with_http_info(opts = {})
279
+ if @api_client.config.debugging
280
+ @api_client.config.logger.debug 'Calling API: PublicApi.oauth_auth ...'
281
+ end
282
+ # resource path
283
+ local_var_path = '/oauth2/auth'
284
+
285
+ # query parameters
286
+ query_params = opts[:query_params] || {}
287
+
288
+ # header parameters
289
+ header_params = opts[:header_params] || {}
290
+ # HTTP header 'Accept' (if needed)
291
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
292
+
293
+ # form parameters
294
+ form_params = opts[:form_params] || {}
295
+
296
+ # http body (model)
297
+ post_body = opts[:body]
298
+
299
+ # return_type
300
+ return_type = opts[:return_type]
301
+
302
+ # auth_names
303
+ auth_names = opts[:auth_names] || []
304
+
305
+ new_options = opts.merge(
306
+ :header_params => header_params,
307
+ :query_params => query_params,
308
+ :form_params => form_params,
309
+ :body => post_body,
310
+ :auth_names => auth_names,
311
+ :return_type => return_type
312
+ )
313
+
314
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
315
+ if @api_client.config.debugging
316
+ @api_client.config.logger.debug "API called: PublicApi#oauth_auth\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
317
+ end
318
+ return data, status_code, headers
319
+ end
320
+
321
+ # Revoke OAuth2 tokens
322
+ # Revoking a token (both access and refresh) means that the tokens will be invalid. A revoked access token can no longer be used to make access requests, and a revoked refresh token can no longer be used to refresh an access token. Revoking a refresh token also invalidates the access token that was created with it. A token may only be revoked by the client the token was generated for.
323
+ # @param token [String]
324
+ # @param [Hash] opts the optional parameters
325
+ # @return [nil]
326
+ def revoke_o_auth2_token(token, opts = {})
327
+ revoke_o_auth2_token_with_http_info(token, opts)
328
+ nil
329
+ end
330
+
331
+ # Revoke OAuth2 tokens
332
+ # Revoking a token (both access and refresh) means that the tokens will be invalid. A revoked access token can no longer be used to make access requests, and a revoked refresh token can no longer be used to refresh an access token. Revoking a refresh token also invalidates the access token that was created with it. A token may only be revoked by the client the token was generated for.
333
+ # @param token [String]
334
+ # @param [Hash] opts the optional parameters
335
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
336
+ def revoke_o_auth2_token_with_http_info(token, opts = {})
337
+ if @api_client.config.debugging
338
+ @api_client.config.logger.debug 'Calling API: PublicApi.revoke_o_auth2_token ...'
339
+ end
340
+ # verify the required parameter 'token' is set
341
+ if @api_client.config.client_side_validation && token.nil?
342
+ fail ArgumentError, "Missing the required parameter 'token' when calling PublicApi.revoke_o_auth2_token"
343
+ end
344
+ # resource path
345
+ local_var_path = '/oauth2/revoke'
346
+
347
+ # query parameters
348
+ query_params = opts[:query_params] || {}
349
+
350
+ # header parameters
351
+ header_params = opts[:header_params] || {}
352
+ # HTTP header 'Accept' (if needed)
353
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
354
+ # HTTP header 'Content-Type'
355
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
356
+
357
+ # form parameters
358
+ form_params = opts[:form_params] || {}
359
+ form_params['token'] = token
360
+
361
+ # http body (model)
362
+ post_body = opts[:body]
363
+
364
+ # return_type
365
+ return_type = opts[:return_type]
366
+
367
+ # auth_names
368
+ auth_names = opts[:auth_names] || ['basic', 'oauth2']
369
+
370
+ new_options = opts.merge(
371
+ :header_params => header_params,
372
+ :query_params => query_params,
373
+ :form_params => form_params,
374
+ :body => post_body,
375
+ :auth_names => auth_names,
376
+ :return_type => return_type
377
+ )
378
+
379
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
380
+ if @api_client.config.debugging
381
+ @api_client.config.logger.debug "API called: PublicApi#revoke_o_auth2_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
382
+ end
383
+ return data, status_code, headers
384
+ end
385
+
386
+ # OpenID Connect Userinfo
387
+ # This endpoint returns the payload of the ID Token, including the idTokenExtra values, of the provided OAuth 2.0 Access Token. For more information please [refer to the spec](http://openid.net/specs/openid-connect-core-1_0.html#UserInfo).
388
+ # @param [Hash] opts the optional parameters
389
+ # @return [UserinfoResponse]
390
+ def userinfo(opts = {})
391
+ data, _status_code, _headers = userinfo_with_http_info(opts)
392
+ data
393
+ end
394
+
395
+ # OpenID Connect Userinfo
396
+ # This endpoint returns the payload of the ID Token, including the idTokenExtra values, of the provided OAuth 2.0 Access Token. For more information please [refer to the spec](http://openid.net/specs/openid-connect-core-1_0.html#UserInfo).
397
+ # @param [Hash] opts the optional parameters
398
+ # @return [Array<(UserinfoResponse, Integer, Hash)>] UserinfoResponse data, response status code and response headers
399
+ def userinfo_with_http_info(opts = {})
400
+ if @api_client.config.debugging
401
+ @api_client.config.logger.debug 'Calling API: PublicApi.userinfo ...'
402
+ end
403
+ # resource path
404
+ local_var_path = '/userinfo'
405
+
406
+ # query parameters
407
+ query_params = opts[:query_params] || {}
408
+
409
+ # header parameters
410
+ header_params = opts[:header_params] || {}
411
+ # HTTP header 'Accept' (if needed)
412
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
413
+
414
+ # form parameters
415
+ form_params = opts[:form_params] || {}
416
+
417
+ # http body (model)
418
+ post_body = opts[:body]
419
+
420
+ # return_type
421
+ return_type = opts[:return_type] || 'UserinfoResponse'
422
+
423
+ # auth_names
424
+ auth_names = opts[:auth_names] || ['oauth2']
425
+
426
+ new_options = opts.merge(
427
+ :header_params => header_params,
428
+ :query_params => query_params,
429
+ :form_params => form_params,
430
+ :body => post_body,
431
+ :auth_names => auth_names,
432
+ :return_type => return_type
433
+ )
434
+
435
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
436
+ if @api_client.config.debugging
437
+ @api_client.config.logger.debug "API called: PublicApi#userinfo\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
438
+ end
439
+ return data, status_code, headers
440
+ end
441
+
442
+ # JSON Web Keys Discovery
443
+ # This endpoint returns JSON Web Keys to be used as public keys for verifying OpenID Connect ID Tokens and, if enabled, OAuth 2.0 JWT Access Tokens. This endpoint can be used with client libraries like [node-jwks-rsa](https://github.com/auth0/node-jwks-rsa) among others.
444
+ # @param [Hash] opts the optional parameters
445
+ # @return [JSONWebKeySet]
446
+ def well_known(opts = {})
447
+ data, _status_code, _headers = well_known_with_http_info(opts)
448
+ data
449
+ end
450
+
451
+ # JSON Web Keys Discovery
452
+ # This endpoint returns JSON Web Keys to be used as public keys for verifying OpenID Connect ID Tokens and, if enabled, OAuth 2.0 JWT Access Tokens. This endpoint can be used with client libraries like [node-jwks-rsa](https://github.com/auth0/node-jwks-rsa) among others.
453
+ # @param [Hash] opts the optional parameters
454
+ # @return [Array<(JSONWebKeySet, Integer, Hash)>] JSONWebKeySet data, response status code and response headers
455
+ def well_known_with_http_info(opts = {})
456
+ if @api_client.config.debugging
457
+ @api_client.config.logger.debug 'Calling API: PublicApi.well_known ...'
458
+ end
459
+ # resource path
460
+ local_var_path = '/.well-known/jwks.json'
461
+
462
+ # query parameters
463
+ query_params = opts[:query_params] || {}
464
+
465
+ # header parameters
466
+ header_params = opts[:header_params] || {}
467
+ # HTTP header 'Accept' (if needed)
468
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
469
+
470
+ # form parameters
471
+ form_params = opts[:form_params] || {}
472
+
473
+ # http body (model)
474
+ post_body = opts[:body]
475
+
476
+ # return_type
477
+ return_type = opts[:return_type] || 'JSONWebKeySet'
478
+
479
+ # auth_names
480
+ auth_names = opts[:auth_names] || []
481
+
482
+ new_options = opts.merge(
483
+ :header_params => header_params,
484
+ :query_params => query_params,
485
+ :form_params => form_params,
486
+ :body => post_body,
487
+ :auth_names => auth_names,
488
+ :return_type => return_type
489
+ )
490
+
491
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
492
+ if @api_client.config.debugging
493
+ @api_client.config.logger.debug "API called: PublicApi#well_known\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
494
+ end
495
+ return data, status_code, headers
496
+ end
497
+ end
498
+ end