Class: OryHydraClient::OAuth2Api

Inherits:
Object
  • Object
show all
Defined in:
lib/ory-hydra-client/api/o_auth2_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ OAuth2Api

Returns a new instance of OAuth2Api.



19
20
21
# File 'lib/ory-hydra-client/api/o_auth2_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/ory-hydra-client/api/o_auth2_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

Accept OAuth 2.0 Consent Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject’s behalf. The consent challenge is appended to the consent provider’s URL to which the subject’s user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted or rejected the request. This endpoint tells Ory that the subject has authorized the OAuth 2.0 client to access resources on his/her behalf. The consent provider includes additional information, such as session data for access and ID tokens, and if the consent request should be used as basis for future requests. The response contains a redirect URL which the consent provider should redirect the user-agent to. The default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please head over to the OAuth 2.0 documentation.

Parameters:

  • consent_challenge (String)

    OAuth 2.0 Consent Request Challenge

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

    the optional parameters

Options Hash (opts):

Returns:



28
29
30
31
# File 'lib/ory-hydra-client/api/o_auth2_api.rb', line 28

def accept_o_auth2_consent_request(consent_challenge, opts = {})
  data, _status_code, _headers = accept_o_auth2_consent_request_with_http_info(consent_challenge, opts)
  data
end

Accept OAuth 2.0 Consent Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf. The consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted or rejected the request. This endpoint tells Ory that the subject has authorized the OAuth 2.0 client to access resources on his/her behalf. The consent provider includes additional information, such as session data for access and ID tokens, and if the consent request should be used as basis for future requests. The response contains a redirect URL which the consent provider should redirect the user-agent to. The default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please head over to the OAuth 2.0 documentation.

Parameters:

  • consent_challenge (String)

    OAuth 2.0 Consent Request Challenge

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

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(OAuth2RedirectTo, Integer, Hash)>)

    OAuth2RedirectTo data, response status code and response headers



39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# File 'lib/ory-hydra-client/api/o_auth2_api.rb', line 39

def accept_o_auth2_consent_request_with_http_info(consent_challenge, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: OAuth2Api.accept_o_auth2_consent_request ...'
  end
  # verify the required parameter 'consent_challenge' is set
  if @api_client.config.client_side_validation && consent_challenge.nil?
    fail ArgumentError, "Missing the required parameter 'consent_challenge' when calling OAuth2Api.accept_o_auth2_consent_request"
  end
  # resource path
  local_var_path = '/admin/oauth2/auth/requests/consent/accept'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'consent_challenge'] = consent_challenge

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'accept_o_auth2_consent_request'])

  # return_type
  return_type = opts[:debug_return_type] || 'OAuth2RedirectTo'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"OAuth2Api.accept_o_auth2_consent_request",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OAuth2Api#accept_o_auth2_consent_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#accept_o_auth2_login_request(login_challenge, opts = {}) ⇒ OAuth2RedirectTo

Accept OAuth 2.0 Login Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell the Ory OAuth2 Service about it. The authentication challenge is appended to the login provider URL to which the subject’s user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. This endpoint tells Ory that the subject has successfully authenticated and includes additional information such as the subject’s ID and if Ory should remember the subject’s subject agent for future authentication attempts by setting a cookie. The response contains a redirect URL which the login provider should redirect the user-agent to.

Parameters:

  • login_challenge (String)

    OAuth 2.0 Login Request Challenge

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

    the optional parameters

Options Hash (opts):

Returns:



99
100
101
102
# File 'lib/ory-hydra-client/api/o_auth2_api.rb', line 99

def (, opts = {})
  data, _status_code, _headers = (, opts)
  data
end

#accept_o_auth2_login_request_with_http_info(login_challenge, opts = {}) ⇒ Array<(OAuth2RedirectTo, Integer, Hash)>

Accept OAuth 2.0 Login Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell the Ory OAuth2 Service about it. The authentication challenge is appended to the login provider URL to which the subject&#39;s user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. This endpoint tells Ory that the subject has successfully authenticated and includes additional information such as the subject&#39;s ID and if Ory should remember the subject&#39;s subject agent for future authentication attempts by setting a cookie. The response contains a redirect URL which the login provider should redirect the user-agent to.

Parameters:

  • login_challenge (String)

    OAuth 2.0 Login Request Challenge

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

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(OAuth2RedirectTo, Integer, Hash)>)

    OAuth2RedirectTo data, response status code and response headers



110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
# File 'lib/ory-hydra-client/api/o_auth2_api.rb', line 110

def (, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: OAuth2Api.accept_o_auth2_login_request ...'
  end
  # verify the required parameter 'login_challenge' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'login_challenge' when calling OAuth2Api.accept_o_auth2_login_request"
  end
  # resource path
  local_var_path = '/admin/oauth2/auth/requests/login/accept'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'login_challenge'] = 

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'accept_o_auth2_login_request'])

  # return_type
  return_type = opts[:debug_return_type] || 'OAuth2RedirectTo'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"OAuth2Api.accept_o_auth2_login_request",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OAuth2Api#accept_o_auth2_login_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#accept_o_auth2_logout_request(logout_challenge, opts = {}) ⇒ OAuth2RedirectTo

Accept OAuth 2.0 Session Logout Request When a user or an application requests Ory OAuth 2.0 to remove the session state of a subject, this endpoint is used to confirm that logout request. The response contains a redirect URL which the consent provider should redirect the user-agent to.

Parameters:

  • logout_challenge (String)

    OAuth 2.0 Logout Request Challenge

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

    the optional parameters

Returns:



169
170
171
172
# File 'lib/ory-hydra-client/api/o_auth2_api.rb', line 169

def accept_o_auth2_logout_request(logout_challenge, opts = {})
  data, _status_code, _headers = accept_o_auth2_logout_request_with_http_info(logout_challenge, opts)
  data
end

#accept_o_auth2_logout_request_with_http_info(logout_challenge, opts = {}) ⇒ Array<(OAuth2RedirectTo, Integer, Hash)>

Accept OAuth 2.0 Session Logout Request When a user or an application requests Ory OAuth 2.0 to remove the session state of a subject, this endpoint is used to confirm that logout request. The response contains a redirect URL which the consent provider should redirect the user-agent to.

Parameters:

  • logout_challenge (String)

    OAuth 2.0 Logout Request Challenge

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

    the optional parameters

Returns:

  • (Array<(OAuth2RedirectTo, Integer, Hash)>)

    OAuth2RedirectTo data, response status code and response headers



179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
# File 'lib/ory-hydra-client/api/o_auth2_api.rb', line 179

def accept_o_auth2_logout_request_with_http_info(logout_challenge, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: OAuth2Api.accept_o_auth2_logout_request ...'
  end
  # verify the required parameter 'logout_challenge' is set
  if @api_client.config.client_side_validation && logout_challenge.nil?
    fail ArgumentError, "Missing the required parameter 'logout_challenge' when calling OAuth2Api.accept_o_auth2_logout_request"
  end
  # resource path
  local_var_path = '/admin/oauth2/auth/requests/logout/accept'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'logout_challenge'] = logout_challenge

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'OAuth2RedirectTo'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"OAuth2Api.accept_o_auth2_logout_request",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OAuth2Api#accept_o_auth2_logout_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_o_auth2_client(o_auth2_client, opts = {}) ⇒ OAuth2Client

Create OAuth 2.0 Client Create a new OAuth 2.0 client. If you pass ‘client_secret` the secret is used, otherwise a random secret is generated. The secret is echoed in the response. It is not possible to retrieve it later on.

Parameters:

  • o_auth2_client (OAuth2Client)

    OAuth 2.0 Client Request Body

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

    the optional parameters

Returns:



233
234
235
236
# File 'lib/ory-hydra-client/api/o_auth2_api.rb', line 233

def create_o_auth2_client(o_auth2_client, opts = {})
  data, _status_code, _headers = create_o_auth2_client_with_http_info(o_auth2_client, opts)
  data
end

#create_o_auth2_client_with_http_info(o_auth2_client, opts = {}) ⇒ Array<(OAuth2Client, Integer, Hash)>

Create OAuth 2.0 Client Create a new OAuth 2.0 client. If you pass &#x60;client_secret&#x60; the secret is used, otherwise a random secret is generated. The secret is echoed in the response. It is not possible to retrieve it later on.

Parameters:

  • o_auth2_client (OAuth2Client)

    OAuth 2.0 Client Request Body

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

    the optional parameters

Returns:

  • (Array<(OAuth2Client, Integer, Hash)>)

    OAuth2Client data, response status code and response headers



243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
# File 'lib/ory-hydra-client/api/o_auth2_api.rb', line 243

def create_o_auth2_client_with_http_info(o_auth2_client, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: OAuth2Api.create_o_auth2_client ...'
  end
  # verify the required parameter 'o_auth2_client' is set
  if @api_client.config.client_side_validation && o_auth2_client.nil?
    fail ArgumentError, "Missing the required parameter 'o_auth2_client' when calling OAuth2Api.create_o_auth2_client"
  end
  # resource path
  local_var_path = '/admin/clients'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(o_auth2_client)

  # return_type
  return_type = opts[:debug_return_type] || 'OAuth2Client'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"OAuth2Api.create_o_auth2_client",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OAuth2Api#create_o_auth2_client\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_o_auth2_client(id, opts = {}) ⇒ nil

Delete OAuth 2.0 Client Delete an existing OAuth 2.0 Client by its ID. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. Make sure that this endpoint is well protected and only callable by first-party components.

Parameters:

  • id (String)

    The id of the OAuth 2.0 Client.

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

    the optional parameters

Returns:

  • (nil)


301
302
303
304
# File 'lib/ory-hydra-client/api/o_auth2_api.rb', line 301

def delete_o_auth2_client(id, opts = {})
  delete_o_auth2_client_with_http_info(id, opts)
  nil
end

#delete_o_auth2_client_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete OAuth 2.0 Client Delete an existing OAuth 2.0 Client by its ID. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. Make sure that this endpoint is well protected and only callable by first-party components.

Parameters:

  • id (String)

    The id of the OAuth 2.0 Client.

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

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



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
# File 'lib/ory-hydra-client/api/o_auth2_api.rb', line 311

def delete_o_auth2_client_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: OAuth2Api.delete_o_auth2_client ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling OAuth2Api.delete_o_auth2_client"
  end
  # resource path
  local_var_path = '/admin/clients/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"OAuth2Api.delete_o_auth2_client",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OAuth2Api#delete_o_auth2_client\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_o_auth2_token(client_id, opts = {}) ⇒ nil

Delete OAuth 2.0 Access Tokens from specific OAuth 2.0 Client This endpoint deletes OAuth2 access tokens issued to an OAuth 2.0 Client from the database.

Parameters:

  • client_id (String)

    OAuth 2.0 Client ID

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

    the optional parameters

Returns:

  • (nil)


364
365
366
367
# File 'lib/ory-hydra-client/api/o_auth2_api.rb', line 364

def delete_o_auth2_token(client_id, opts = {})
  delete_o_auth2_token_with_http_info(client_id, opts)
  nil
end

#delete_o_auth2_token_with_http_info(client_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete OAuth 2.0 Access Tokens from specific OAuth 2.0 Client This endpoint deletes OAuth2 access tokens issued to an OAuth 2.0 Client from the database.

Parameters:

  • client_id (String)

    OAuth 2.0 Client ID

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

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



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
# File 'lib/ory-hydra-client/api/o_auth2_api.rb', line 374

def delete_o_auth2_token_with_http_info(client_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: OAuth2Api.delete_o_auth2_token ...'
  end
  # verify the required parameter 'client_id' is set
  if @api_client.config.client_side_validation && client_id.nil?
    fail ArgumentError, "Missing the required parameter 'client_id' when calling OAuth2Api.delete_o_auth2_token"
  end
  # resource path
  local_var_path = '/admin/oauth2/tokens'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'client_id'] = client_id

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"OAuth2Api.delete_o_auth2_token",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OAuth2Api#delete_o_auth2_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_trusted_o_auth2_jwt_grant_issuer(id, opts = {}) ⇒ nil

Delete Trusted OAuth2 JWT Bearer Grant Type Issuer Use this endpoint to delete trusted JWT Bearer Grant Type Issuer. The ID is the one returned when you created the trust relationship. Once deleted, the associated issuer will no longer be able to perform the JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grant.

Parameters:

  • id (String)

    The id of the desired grant

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

    the optional parameters

Returns:

  • (nil)


428
429
430
431
# File 'lib/ory-hydra-client/api/o_auth2_api.rb', line 428

def delete_trusted_o_auth2_jwt_grant_issuer(id, opts = {})
  delete_trusted_o_auth2_jwt_grant_issuer_with_http_info(id, opts)
  nil
end

#delete_trusted_o_auth2_jwt_grant_issuer_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete Trusted OAuth2 JWT Bearer Grant Type Issuer Use this endpoint to delete trusted JWT Bearer Grant Type Issuer. The ID is the one returned when you created the trust relationship. Once deleted, the associated issuer will no longer be able to perform the JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grant.

Parameters:

  • id (String)

    The id of the desired grant

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

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



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-hydra-client/api/o_auth2_api.rb', line 438

def delete_trusted_o_auth2_jwt_grant_issuer_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: OAuth2Api.delete_trusted_o_auth2_jwt_grant_issuer ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling OAuth2Api.delete_trusted_o_auth2_jwt_grant_issuer"
  end
  # resource path
  local_var_path = '/admin/trust/grants/jwt-bearer/issuers/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"OAuth2Api.delete_trusted_o_auth2_jwt_grant_issuer",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OAuth2Api#delete_trusted_o_auth2_jwt_grant_issuer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_o_auth2_client(id, opts = {}) ⇒ OAuth2Client

Get an OAuth 2.0 Client Get an OAuth 2.0 client by its ID. This endpoint never returns the client secret. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.

Parameters:

  • id (String)

    The id of the OAuth 2.0 Client.

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

    the optional parameters

Returns:



491
492
493
494
# File 'lib/ory-hydra-client/api/o_auth2_api.rb', line 491

def get_o_auth2_client(id, opts = {})
  data, _status_code, _headers = get_o_auth2_client_with_http_info(id, opts)
  data
end

#get_o_auth2_client_with_http_info(id, opts = {}) ⇒ Array<(OAuth2Client, Integer, Hash)>

Get an OAuth 2.0 Client Get an OAuth 2.0 client by its ID. This endpoint never returns the client secret. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.

Parameters:

  • id (String)

    The id of the OAuth 2.0 Client.

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

    the optional parameters

Returns:

  • (Array<(OAuth2Client, Integer, Hash)>)

    OAuth2Client data, response status code and response headers



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
# File 'lib/ory-hydra-client/api/o_auth2_api.rb', line 501

def get_o_auth2_client_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: OAuth2Api.get_o_auth2_client ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling OAuth2Api.get_o_auth2_client"
  end
  # resource path
  local_var_path = '/admin/clients/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'OAuth2Client'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"OAuth2Api.get_o_auth2_client",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OAuth2Api#get_o_auth2_client\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

Get OAuth 2.0 Consent Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject’s behalf. The consent challenge is appended to the consent provider’s URL to which the subject’s user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted or rejected the request. The default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please head over to the OAuth 2.0 documentation.

Parameters:

  • consent_challenge (String)

    OAuth 2.0 Consent Request Challenge

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

    the optional parameters

Returns:



554
555
556
557
# File 'lib/ory-hydra-client/api/o_auth2_api.rb', line 554

def get_o_auth2_consent_request(consent_challenge, opts = {})
  data, _status_code, _headers = get_o_auth2_consent_request_with_http_info(consent_challenge, opts)
  data
end

Get OAuth 2.0 Consent Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject&#39;s behalf. The consent challenge is appended to the consent provider&#39;s URL to which the subject&#39;s user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted or rejected the request. The default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please head over to the OAuth 2.0 documentation.

Parameters:

  • consent_challenge (String)

    OAuth 2.0 Consent Request Challenge

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

    the optional parameters

Returns:

  • (Array<(OAuth2ConsentRequest, Integer, Hash)>)

    OAuth2ConsentRequest data, response status code and response headers



564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
# File 'lib/ory-hydra-client/api/o_auth2_api.rb', line 564

def get_o_auth2_consent_request_with_http_info(consent_challenge, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: OAuth2Api.get_o_auth2_consent_request ...'
  end
  # verify the required parameter 'consent_challenge' is set
  if @api_client.config.client_side_validation && consent_challenge.nil?
    fail ArgumentError, "Missing the required parameter 'consent_challenge' when calling OAuth2Api.get_o_auth2_consent_request"
  end
  # resource path
  local_var_path = '/admin/oauth2/auth/requests/consent'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'consent_challenge'] = consent_challenge

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'OAuth2ConsentRequest'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"OAuth2Api.get_o_auth2_consent_request",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OAuth2Api#get_o_auth2_consent_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_o_auth2_login_request(login_challenge, opts = {}) ⇒ OAuth2LoginRequest

Get OAuth 2.0 Login Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell the Ory OAuth2 Service about it. Per default, the login provider is Ory itself. You may use a different login provider which needs to be a web-app you write and host, and it must be able to authenticate ("show the subject a login screen") a subject (in OAuth2 the proper name for subject is "resource owner"). The authentication challenge is appended to the login provider URL to which the subject’s user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process.

Parameters:

  • login_challenge (String)

    OAuth 2.0 Login Request Challenge

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

    the optional parameters

Returns:



618
619
620
621
# File 'lib/ory-hydra-client/api/o_auth2_api.rb', line 618

def (, opts = {})
  data, _status_code, _headers = (, opts)
  data
end

#get_o_auth2_login_request_with_http_info(login_challenge, opts = {}) ⇒ Array<(OAuth2LoginRequest, Integer, Hash)>

Get OAuth 2.0 Login Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell the Ory OAuth2 Service about it. Per default, the login provider is Ory itself. You may use a different login provider which needs to be a web-app you write and host, and it must be able to authenticate (&quot;show the subject a login screen&quot;) a subject (in OAuth2 the proper name for subject is &quot;resource owner&quot;). The authentication challenge is appended to the login provider URL to which the subject&#39;s user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process.

Parameters:

  • login_challenge (String)

    OAuth 2.0 Login Request Challenge

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

    the optional parameters

Returns:

  • (Array<(OAuth2LoginRequest, Integer, Hash)>)

    OAuth2LoginRequest data, response status code and response headers



628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
# File 'lib/ory-hydra-client/api/o_auth2_api.rb', line 628

def (, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: OAuth2Api.get_o_auth2_login_request ...'
  end
  # verify the required parameter 'login_challenge' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'login_challenge' when calling OAuth2Api.get_o_auth2_login_request"
  end
  # resource path
  local_var_path = '/admin/oauth2/auth/requests/login'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'login_challenge'] = 

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'OAuth2LoginRequest'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"OAuth2Api.get_o_auth2_login_request",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OAuth2Api#get_o_auth2_login_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_o_auth2_logout_request(logout_challenge, opts = {}) ⇒ OAuth2LogoutRequest

Get OAuth 2.0 Session Logout Request Use this endpoint to fetch an Ory OAuth 2.0 logout request.

Parameters:

  • logout_challenge (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



682
683
684
685
# File 'lib/ory-hydra-client/api/o_auth2_api.rb', line 682

def get_o_auth2_logout_request(logout_challenge, opts = {})
  data, _status_code, _headers = get_o_auth2_logout_request_with_http_info(logout_challenge, opts)
  data
end

#get_o_auth2_logout_request_with_http_info(logout_challenge, opts = {}) ⇒ Array<(OAuth2LogoutRequest, Integer, Hash)>

Get OAuth 2.0 Session Logout Request Use this endpoint to fetch an Ory OAuth 2.0 logout request.

Parameters:

  • logout_challenge (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(OAuth2LogoutRequest, Integer, Hash)>)

    OAuth2LogoutRequest data, response status code and response headers



692
693
694
695
696
697
698
699
700
701
702
703
704
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
# File 'lib/ory-hydra-client/api/o_auth2_api.rb', line 692

def get_o_auth2_logout_request_with_http_info(logout_challenge, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: OAuth2Api.get_o_auth2_logout_request ...'
  end
  # verify the required parameter 'logout_challenge' is set
  if @api_client.config.client_side_validation && logout_challenge.nil?
    fail ArgumentError, "Missing the required parameter 'logout_challenge' when calling OAuth2Api.get_o_auth2_logout_request"
  end
  # resource path
  local_var_path = '/admin/oauth2/auth/requests/logout'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'logout_challenge'] = logout_challenge

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'OAuth2LogoutRequest'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"OAuth2Api.get_o_auth2_logout_request",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OAuth2Api#get_o_auth2_logout_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_trusted_o_auth2_jwt_grant_issuer(id, opts = {}) ⇒ TrustedOAuth2JwtGrantIssuer

Get Trusted OAuth2 JWT Bearer Grant Type Issuer Use this endpoint to get a trusted JWT Bearer Grant Type Issuer. The ID is the one returned when you created the trust relationship.

Parameters:

  • id (String)

    The id of the desired grant

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

    the optional parameters

Returns:



746
747
748
749
# File 'lib/ory-hydra-client/api/o_auth2_api.rb', line 746

def get_trusted_o_auth2_jwt_grant_issuer(id, opts = {})
  data, _status_code, _headers = get_trusted_o_auth2_jwt_grant_issuer_with_http_info(id, opts)
  data
end

#get_trusted_o_auth2_jwt_grant_issuer_with_http_info(id, opts = {}) ⇒ Array<(TrustedOAuth2JwtGrantIssuer, Integer, Hash)>

Get Trusted OAuth2 JWT Bearer Grant Type Issuer Use this endpoint to get a trusted JWT Bearer Grant Type Issuer. The ID is the one returned when you created the trust relationship.

Parameters:

  • id (String)

    The id of the desired grant

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

    the optional parameters

Returns:

  • (Array<(TrustedOAuth2JwtGrantIssuer, Integer, Hash)>)

    TrustedOAuth2JwtGrantIssuer data, response status code and response headers



756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
# File 'lib/ory-hydra-client/api/o_auth2_api.rb', line 756

def get_trusted_o_auth2_jwt_grant_issuer_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: OAuth2Api.get_trusted_o_auth2_jwt_grant_issuer ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling OAuth2Api.get_trusted_o_auth2_jwt_grant_issuer"
  end
  # resource path
  local_var_path = '/admin/trust/grants/jwt-bearer/issuers/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'TrustedOAuth2JwtGrantIssuer'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"OAuth2Api.get_trusted_o_auth2_jwt_grant_issuer",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OAuth2Api#get_trusted_o_auth2_jwt_grant_issuer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#introspect_o_auth2_token(token, opts = {}) ⇒ IntrospectedOAuth2Token

Introspect OAuth2 Access and Refresh Tokens The introspection endpoint allows to check if a token (both refresh and access) is active or not. An active token is neither expired nor revoked. If a token is active, additional information on the token will be included. You can set additional data for a token by setting ‘session.access_token` during the consent flow.

Parameters:

  • token (String)

    The string value of the token. For access tokens, this is the \&quot;access_token\&quot; value returned from the token endpoint defined in OAuth 2.0. For refresh tokens, this is the \&quot;refresh_token\&quot; value returned.

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

    the optional parameters

Options Hash (opts):

  • :scope (String)

    An optional, space separated list of required scopes. If the access token was not granted one of the scopes, the result of active will be false.

Returns:



810
811
812
813
# File 'lib/ory-hydra-client/api/o_auth2_api.rb', line 810

def introspect_o_auth2_token(token, opts = {})
  data, _status_code, _headers = introspect_o_auth2_token_with_http_info(token, opts)
  data
end

#introspect_o_auth2_token_with_http_info(token, opts = {}) ⇒ Array<(IntrospectedOAuth2Token, Integer, Hash)>

Introspect OAuth2 Access and Refresh Tokens The introspection endpoint allows to check if a token (both refresh and access) is active or not. An active token is neither expired nor revoked. If a token is active, additional information on the token will be included. You can set additional data for a token by setting &#x60;session.access_token&#x60; during the consent flow.

Parameters:

  • token (String)

    The string value of the token. For access tokens, this is the \&quot;access_token\&quot; value returned from the token endpoint defined in OAuth 2.0. For refresh tokens, this is the \&quot;refresh_token\&quot; value returned.

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

    the optional parameters

Options Hash (opts):

  • :scope (String)

    An optional, space separated list of required scopes. If the access token was not granted one of the scopes, the result of active will be false.

Returns:

  • (Array<(IntrospectedOAuth2Token, Integer, Hash)>)

    IntrospectedOAuth2Token data, response status code and response headers



821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
# File 'lib/ory-hydra-client/api/o_auth2_api.rb', line 821

def introspect_o_auth2_token_with_http_info(token, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: OAuth2Api.introspect_o_auth2_token ...'
  end
  # verify the required parameter 'token' is set
  if @api_client.config.client_side_validation && token.nil?
    fail ArgumentError, "Missing the required parameter 'token' when calling OAuth2Api.introspect_o_auth2_token"
  end
  # resource path
  local_var_path = '/admin/oauth2/introspect'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}
  form_params['token'] = token
  form_params['scope'] = opts[:'scope'] if !opts[:'scope'].nil?

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'IntrospectedOAuth2Token'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"OAuth2Api.introspect_o_auth2_token",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OAuth2Api#introspect_o_auth2_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_o_auth2_clients(opts = {}) ⇒ Array<OAuth2Client>

List OAuth 2.0 Clients This endpoint lists all clients in the database, and never returns client secrets. As a default it lists the first 100 clients.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](www.ory.sh/docs/ecosystem/api-design#pagination). (default to 250)

  • :page_token (String)

    Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](www.ory.sh/docs/ecosystem/api-design#pagination). (default to ‘1’)

  • :client_name (String)

    The name of the clients to filter by.

  • :owner (String)

    The owner of the clients to filter by.

Returns:



884
885
886
887
# File 'lib/ory-hydra-client/api/o_auth2_api.rb', line 884

def list_o_auth2_clients(opts = {})
  data, _status_code, _headers = list_o_auth2_clients_with_http_info(opts)
  data
end

#list_o_auth2_clients_with_http_info(opts = {}) ⇒ Array<(Array<OAuth2Client>, Integer, Hash)>

List OAuth 2.0 Clients This endpoint lists all clients in the database, and never returns client secrets. As a default it lists the first 100 clients.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](www.ory.sh/docs/ecosystem/api-design#pagination). (default to 250)

  • :page_token (String)

    Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](www.ory.sh/docs/ecosystem/api-design#pagination). (default to ‘1’)

  • :client_name (String)

    The name of the clients to filter by.

  • :owner (String)

    The owner of the clients to filter by.

Returns:

  • (Array<(Array<OAuth2Client>, Integer, Hash)>)

    Array<OAuth2Client> data, response status code and response headers



897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
# File 'lib/ory-hydra-client/api/o_auth2_api.rb', line 897

def list_o_auth2_clients_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: OAuth2Api.list_o_auth2_clients ...'
  end
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 500
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling OAuth2Api.list_o_auth2_clients, must be smaller than or equal to 500.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling OAuth2Api.list_o_auth2_clients, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/admin/clients'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'page_token'] = opts[:'page_token'] if !opts[:'page_token'].nil?
  query_params[:'client_name'] = opts[:'client_name'] if !opts[:'client_name'].nil?
  query_params[:'owner'] = opts[:'owner'] if !opts[:'owner'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Array<OAuth2Client>'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"OAuth2Api.list_o_auth2_clients",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OAuth2Api#list_o_auth2_clients\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

List OAuth 2.0 Consent Sessions of a Subject This endpoint lists all subject’s granted consent sessions, including client and granted scope. If the subject is unknown or has not granted any consent sessions yet, the endpoint returns an empty JSON array with status code 200 OK.

Parameters:

  • subject (String)

    The subject to list the consent sessions for.

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](www.ory.sh/docs/ecosystem/api-design#pagination). (default to 250)

  • :page_token (String)

    Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](www.ory.sh/docs/ecosystem/api-design#pagination). (default to ‘1’)

  • :login_session_id (String)

    The login session id to list the consent sessions for.

Returns:



961
962
963
964
# File 'lib/ory-hydra-client/api/o_auth2_api.rb', line 961

def list_o_auth2_consent_sessions(subject, opts = {})
  data, _status_code, _headers = list_o_auth2_consent_sessions_with_http_info(subject, opts)
  data
end

List OAuth 2.0 Consent Sessions of a Subject This endpoint lists all subject&#39;s granted consent sessions, including client and granted scope. If the subject is unknown or has not granted any consent sessions yet, the endpoint returns an empty JSON array with status code 200 OK.

Parameters:

  • subject (String)

    The subject to list the consent sessions for.

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

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)

    Items per Page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](www.ory.sh/docs/ecosystem/api-design#pagination). (default to 250)

  • :page_token (String)

    Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](www.ory.sh/docs/ecosystem/api-design#pagination). (default to ‘1’)

  • :login_session_id (String)

    The login session id to list the consent sessions for.

Returns:

  • (Array<(Array<OAuth2ConsentSession>, Integer, Hash)>)

    Array<OAuth2ConsentSession> data, response status code and response headers



974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
# File 'lib/ory-hydra-client/api/o_auth2_api.rb', line 974

def list_o_auth2_consent_sessions_with_http_info(subject, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: OAuth2Api.list_o_auth2_consent_sessions ...'
  end
  # verify the required parameter 'subject' is set
  if @api_client.config.client_side_validation && subject.nil?
    fail ArgumentError, "Missing the required parameter 'subject' when calling OAuth2Api.list_o_auth2_consent_sessions"
  end
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 500
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling OAuth2Api.list_o_auth2_consent_sessions, must be smaller than or equal to 500.'
  end

  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling OAuth2Api.list_o_auth2_consent_sessions, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/admin/oauth2/auth/sessions/consent'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'subject'] = subject
  query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
  query_params[:'page_token'] = opts[:'page_token'] if !opts[:'page_token'].nil?
  query_params[:'login_session_id'] = opts[:'login_session_id'] if !opts[:'login_session_id'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Array<OAuth2ConsentSession>'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"OAuth2Api.list_o_auth2_consent_sessions",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OAuth2Api#list_o_auth2_consent_sessions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_trusted_o_auth2_jwt_grant_issuers(opts = {}) ⇒ Array<TrustedOAuth2JwtGrantIssuer>

List Trusted OAuth2 JWT Bearer Grant Type Issuers Use this endpoint to list all trusted JWT Bearer Grant Type Issuers.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :max_items (Integer)
  • :default_items (Integer)
  • :issuer (String)

    If optional &quot;issuer&quot; is supplied, only jwt-bearer grants with this issuer will be returned.

Returns:



1041
1042
1043
1044
# File 'lib/ory-hydra-client/api/o_auth2_api.rb', line 1041

def list_trusted_o_auth2_jwt_grant_issuers(opts = {})
  data, _status_code, _headers = list_trusted_o_auth2_jwt_grant_issuers_with_http_info(opts)
  data
end

#list_trusted_o_auth2_jwt_grant_issuers_with_http_info(opts = {}) ⇒ Array<(Array<TrustedOAuth2JwtGrantIssuer>, Integer, Hash)>

List Trusted OAuth2 JWT Bearer Grant Type Issuers Use this endpoint to list all trusted JWT Bearer Grant Type Issuers.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :max_items (Integer)
  • :default_items (Integer)
  • :issuer (String)

    If optional &quot;issuer&quot; is supplied, only jwt-bearer grants with this issuer will be returned.

Returns:

  • (Array<(Array<TrustedOAuth2JwtGrantIssuer>, Integer, Hash)>)

    Array<TrustedOAuth2JwtGrantIssuer> data, response status code and response headers



1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
# File 'lib/ory-hydra-client/api/o_auth2_api.rb', line 1053

def list_trusted_o_auth2_jwt_grant_issuers_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: OAuth2Api.list_trusted_o_auth2_jwt_grant_issuers ...'
  end
  # resource path
  local_var_path = '/admin/trust/grants/jwt-bearer/issuers'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'MaxItems'] = opts[:'max_items'] if !opts[:'max_items'].nil?
  query_params[:'DefaultItems'] = opts[:'default_items'] if !opts[:'default_items'].nil?
  query_params[:'issuer'] = opts[:'issuer'] if !opts[:'issuer'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Array<TrustedOAuth2JwtGrantIssuer>'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"OAuth2Api.list_trusted_o_auth2_jwt_grant_issuers",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OAuth2Api#list_trusted_o_auth2_jwt_grant_issuers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#o_auth2_authorize(opts = {}) ⇒ ErrorOAuth2

OAuth 2.0 Authorize Endpoint Use open source libraries to perform OAuth 2.0 and OpenID Connect available for any programming language. You can find a list of libraries at oauth.net/code/ The Ory SDK is not yet able to this endpoint properly.

Parameters:

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

    the optional parameters

Returns:



1104
1105
1106
1107
# File 'lib/ory-hydra-client/api/o_auth2_api.rb', line 1104

def o_auth2_authorize(opts = {})
  data, _status_code, _headers = o_auth2_authorize_with_http_info(opts)
  data
end

#o_auth2_authorize_with_http_info(opts = {}) ⇒ Array<(ErrorOAuth2, Integer, Hash)>

OAuth 2.0 Authorize Endpoint Use open source libraries to perform OAuth 2.0 and OpenID Connect available for any programming language. You can find a list of libraries at oauth.net/code/ The Ory SDK is not yet able to this endpoint properly.

Parameters:

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

    the optional parameters

Returns:

  • (Array<(ErrorOAuth2, Integer, Hash)>)

    ErrorOAuth2 data, response status code and response headers



1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
# File 'lib/ory-hydra-client/api/o_auth2_api.rb', line 1113

def o_auth2_authorize_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: OAuth2Api.o_auth2_authorize ...'
  end
  # resource path
  local_var_path = '/oauth2/auth'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'ErrorOAuth2'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"OAuth2Api.o_auth2_authorize",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OAuth2Api#o_auth2_authorize\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#oauth2_token_exchange(grant_type, opts = {}) ⇒ OAuth2TokenExchange

The OAuth 2.0 Token Endpoint Use open source libraries to perform OAuth 2.0 and OpenID Connect available for any programming language. You can find a list of libraries here oauth.net/code/ The Ory SDK is not yet able to this endpoint properly.

Parameters:

  • grant_type (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :client_id (String)
  • :code (String)
  • :redirect_uri (String)
  • :refresh_token (String)

Returns:



1166
1167
1168
1169
# File 'lib/ory-hydra-client/api/o_auth2_api.rb', line 1166

def oauth2_token_exchange(grant_type, opts = {})
  data, _status_code, _headers = oauth2_token_exchange_with_http_info(grant_type, opts)
  data
end

#oauth2_token_exchange_with_http_info(grant_type, opts = {}) ⇒ Array<(OAuth2TokenExchange, Integer, Hash)>

The OAuth 2.0 Token Endpoint Use open source libraries to perform OAuth 2.0 and OpenID Connect available for any programming language. You can find a list of libraries here oauth.net/code/ The Ory SDK is not yet able to this endpoint properly.

Parameters:

  • grant_type (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :client_id (String)
  • :code (String)
  • :redirect_uri (String)
  • :refresh_token (String)

Returns:

  • (Array<(OAuth2TokenExchange, Integer, Hash)>)

    OAuth2TokenExchange data, response status code and response headers



1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
# File 'lib/ory-hydra-client/api/o_auth2_api.rb', line 1180

def oauth2_token_exchange_with_http_info(grant_type, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: OAuth2Api.oauth2_token_exchange ...'
  end
  # verify the required parameter 'grant_type' is set
  if @api_client.config.client_side_validation && grant_type.nil?
    fail ArgumentError, "Missing the required parameter 'grant_type' when calling OAuth2Api.oauth2_token_exchange"
  end
  # resource path
  local_var_path = '/oauth2/token'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}
  form_params['grant_type'] = grant_type
  form_params['client_id'] = opts[:'client_id'] if !opts[:'client_id'].nil?
  form_params['code'] = opts[:'code'] if !opts[:'code'].nil?
  form_params['redirect_uri'] = opts[:'redirect_uri'] if !opts[:'redirect_uri'].nil?
  form_params['refresh_token'] = opts[:'refresh_token'] if !opts[:'refresh_token'].nil?

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'OAuth2TokenExchange'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic', 'oauth2']

  new_options = opts.merge(
    :operation => :"OAuth2Api.oauth2_token_exchange",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OAuth2Api#oauth2_token_exchange\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#patch_o_auth2_client(id, json_patch, opts = {}) ⇒ OAuth2Client

Patch OAuth 2.0 Client Patch an existing OAuth 2.0 Client using JSON Patch. If you pass ‘client_secret` the secret will be updated and returned via the API. This is the only time you will be able to retrieve the client secret, so write it down and keep it safe. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.

Parameters:

  • id (String)

    The id of the OAuth 2.0 Client.

  • json_patch (Array<JsonPatch>)

    OAuth 2.0 Client JSON Patch Body

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

    the optional parameters

Returns:



1244
1245
1246
1247
# File 'lib/ory-hydra-client/api/o_auth2_api.rb', line 1244

def patch_o_auth2_client(id, json_patch, opts = {})
  data, _status_code, _headers = patch_o_auth2_client_with_http_info(id, json_patch, opts)
  data
end

#patch_o_auth2_client_with_http_info(id, json_patch, opts = {}) ⇒ Array<(OAuth2Client, Integer, Hash)>

Patch OAuth 2.0 Client Patch an existing OAuth 2.0 Client using JSON Patch. If you pass &#x60;client_secret&#x60; the secret will be updated and returned via the API. This is the only time you will be able to retrieve the client secret, so write it down and keep it safe. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.

Parameters:

  • id (String)

    The id of the OAuth 2.0 Client.

  • json_patch (Array<JsonPatch>)

    OAuth 2.0 Client JSON Patch Body

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

    the optional parameters

Returns:

  • (Array<(OAuth2Client, Integer, Hash)>)

    OAuth2Client data, response status code and response headers



1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
# File 'lib/ory-hydra-client/api/o_auth2_api.rb', line 1255

def patch_o_auth2_client_with_http_info(id, json_patch, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: OAuth2Api.patch_o_auth2_client ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling OAuth2Api.patch_o_auth2_client"
  end
  # verify the required parameter 'json_patch' is set
  if @api_client.config.client_side_validation && json_patch.nil?
    fail ArgumentError, "Missing the required parameter 'json_patch' when calling OAuth2Api.patch_o_auth2_client"
  end
  # resource path
  local_var_path = '/admin/clients/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(json_patch)

  # return_type
  return_type = opts[:debug_return_type] || 'OAuth2Client'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"OAuth2Api.patch_o_auth2_client",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OAuth2Api#patch_o_auth2_client\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

Reject OAuth 2.0 Consent Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject’s behalf. The consent challenge is appended to the consent provider’s URL to which the subject’s user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted or rejected the request. This endpoint tells Ory that the subject has not authorized the OAuth 2.0 client to access resources on his/her behalf. The consent provider must include a reason why the consent was not granted. The response contains a redirect URL which the consent provider should redirect the user-agent to. The default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please head over to the OAuth 2.0 documentation.

Parameters:

  • consent_challenge (String)

    OAuth 2.0 Consent Request Challenge

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

    the optional parameters

Options Hash (opts):

Returns:



1318
1319
1320
1321
# File 'lib/ory-hydra-client/api/o_auth2_api.rb', line 1318

def reject_o_auth2_consent_request(consent_challenge, opts = {})
  data, _status_code, _headers = reject_o_auth2_consent_request_with_http_info(consent_challenge, opts)
  data
end

Reject OAuth 2.0 Consent Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell Ory now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject&#39;s behalf. The consent challenge is appended to the consent provider&#39;s URL to which the subject&#39;s user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells Ory if the subject accepted or rejected the request. This endpoint tells Ory that the subject has not authorized the OAuth 2.0 client to access resources on his/her behalf. The consent provider must include a reason why the consent was not granted. The response contains a redirect URL which the consent provider should redirect the user-agent to. The default consent provider is available via the Ory Managed Account Experience. To customize the consent provider, please head over to the OAuth 2.0 documentation.

Parameters:

  • consent_challenge (String)

    OAuth 2.0 Consent Request Challenge

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

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(OAuth2RedirectTo, Integer, Hash)>)

    OAuth2RedirectTo data, response status code and response headers



1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
# File 'lib/ory-hydra-client/api/o_auth2_api.rb', line 1329

def reject_o_auth2_consent_request_with_http_info(consent_challenge, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: OAuth2Api.reject_o_auth2_consent_request ...'
  end
  # verify the required parameter 'consent_challenge' is set
  if @api_client.config.client_side_validation && consent_challenge.nil?
    fail ArgumentError, "Missing the required parameter 'consent_challenge' when calling OAuth2Api.reject_o_auth2_consent_request"
  end
  # resource path
  local_var_path = '/admin/oauth2/auth/requests/consent/reject'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'consent_challenge'] = consent_challenge

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'reject_o_auth2_request'])

  # return_type
  return_type = opts[:debug_return_type] || 'OAuth2RedirectTo'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"OAuth2Api.reject_o_auth2_consent_request",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OAuth2Api#reject_o_auth2_consent_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#reject_o_auth2_login_request(login_challenge, opts = {}) ⇒ OAuth2RedirectTo

Reject OAuth 2.0 Login Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell the Ory OAuth2 Service about it. The authentication challenge is appended to the login provider URL to which the subject’s user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. This endpoint tells Ory that the subject has not authenticated and includes a reason why the authentication was denied. The response contains a redirect URL which the login provider should redirect the user-agent to.

Parameters:

  • login_challenge (String)

    OAuth 2.0 Login Request Challenge

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

    the optional parameters

Options Hash (opts):

Returns:



1389
1390
1391
1392
# File 'lib/ory-hydra-client/api/o_auth2_api.rb', line 1389

def (, opts = {})
  data, _status_code, _headers = (, opts)
  data
end

#reject_o_auth2_login_request_with_http_info(login_challenge, opts = {}) ⇒ Array<(OAuth2RedirectTo, Integer, Hash)>

Reject OAuth 2.0 Login Request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory asks the login provider to authenticate the subject and then tell the Ory OAuth2 Service about it. The authentication challenge is appended to the login provider URL to which the subject&#39;s user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. This endpoint tells Ory that the subject has not authenticated and includes a reason why the authentication was denied. The response contains a redirect URL which the login provider should redirect the user-agent to.

Parameters:

  • login_challenge (String)

    OAuth 2.0 Login Request Challenge

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

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(OAuth2RedirectTo, Integer, Hash)>)

    OAuth2RedirectTo data, response status code and response headers



1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
# File 'lib/ory-hydra-client/api/o_auth2_api.rb', line 1400

def (, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: OAuth2Api.reject_o_auth2_login_request ...'
  end
  # verify the required parameter 'login_challenge' is set
  if @api_client.config.client_side_validation && .nil?
    fail ArgumentError, "Missing the required parameter 'login_challenge' when calling OAuth2Api.reject_o_auth2_login_request"
  end
  # resource path
  local_var_path = '/admin/oauth2/auth/requests/login/reject'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'login_challenge'] = 

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'reject_o_auth2_request'])

  # return_type
  return_type = opts[:debug_return_type] || 'OAuth2RedirectTo'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"OAuth2Api.reject_o_auth2_login_request",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OAuth2Api#reject_o_auth2_login_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#reject_o_auth2_logout_request(logout_challenge, opts = {}) ⇒ nil

Reject OAuth 2.0 Session Logout Request When a user or an application requests Ory OAuth 2.0 to remove the session state of a subject, this endpoint is used to deny that logout request. No HTTP request body is required. The response is empty as the logout provider has to chose what action to perform next.

Parameters:

  • logout_challenge (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


1459
1460
1461
1462
# File 'lib/ory-hydra-client/api/o_auth2_api.rb', line 1459

def reject_o_auth2_logout_request(logout_challenge, opts = {})
  reject_o_auth2_logout_request_with_http_info(logout_challenge, opts)
  nil
end

#reject_o_auth2_logout_request_with_http_info(logout_challenge, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Reject OAuth 2.0 Session Logout Request When a user or an application requests Ory OAuth 2.0 to remove the session state of a subject, this endpoint is used to deny that logout request. No HTTP request body is required. The response is empty as the logout provider has to chose what action to perform next.

Parameters:

  • logout_challenge (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
# File 'lib/ory-hydra-client/api/o_auth2_api.rb', line 1469

def reject_o_auth2_logout_request_with_http_info(logout_challenge, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: OAuth2Api.reject_o_auth2_logout_request ...'
  end
  # verify the required parameter 'logout_challenge' is set
  if @api_client.config.client_side_validation && logout_challenge.nil?
    fail ArgumentError, "Missing the required parameter 'logout_challenge' when calling OAuth2Api.reject_o_auth2_logout_request"
  end
  # resource path
  local_var_path = '/admin/oauth2/auth/requests/logout/reject'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'logout_challenge'] = logout_challenge

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"OAuth2Api.reject_o_auth2_logout_request",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OAuth2Api#reject_o_auth2_logout_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

Revoke OAuth 2.0 Consent Sessions of a Subject This endpoint revokes a subject’s granted consent sessions and invalidates all associated OAuth 2.0 Access Tokens. You may also only revoke sessions for a specific OAuth 2.0 Client ID.

Parameters:

  • subject (String)

    OAuth 2.0 Consent Subject The subject whose consent sessions should be deleted.

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

    the optional parameters

Options Hash (opts):

  • :client (String)

    OAuth 2.0 Client ID If set, deletes only those consent sessions that have been granted to the specified OAuth 2.0 Client ID.

  • :all (Boolean)

    Revoke All Consent Sessions If set to &#x60;true&#x60; deletes all consent sessions by the Subject that have been granted.

Returns:

  • (nil)


1525
1526
1527
1528
# File 'lib/ory-hydra-client/api/o_auth2_api.rb', line 1525

def revoke_o_auth2_consent_sessions(subject, opts = {})
  revoke_o_auth2_consent_sessions_with_http_info(subject, opts)
  nil
end

Revoke OAuth 2.0 Consent Sessions of a Subject This endpoint revokes a subject&#39;s granted consent sessions and invalidates all associated OAuth 2.0 Access Tokens. You may also only revoke sessions for a specific OAuth 2.0 Client ID.

Parameters:

  • subject (String)

    OAuth 2.0 Consent Subject The subject whose consent sessions should be deleted.

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

    the optional parameters

Options Hash (opts):

  • :client (String)

    OAuth 2.0 Client ID If set, deletes only those consent sessions that have been granted to the specified OAuth 2.0 Client ID.

  • :all (Boolean)

    Revoke All Consent Sessions If set to &#x60;true&#x60; deletes all consent sessions by the Subject that have been granted.

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
# File 'lib/ory-hydra-client/api/o_auth2_api.rb', line 1537

def revoke_o_auth2_consent_sessions_with_http_info(subject, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: OAuth2Api.revoke_o_auth2_consent_sessions ...'
  end
  # verify the required parameter 'subject' is set
  if @api_client.config.client_side_validation && subject.nil?
    fail ArgumentError, "Missing the required parameter 'subject' when calling OAuth2Api.revoke_o_auth2_consent_sessions"
  end
  # resource path
  local_var_path = '/admin/oauth2/auth/sessions/consent'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'subject'] = subject
  query_params[:'client'] = opts[:'client'] if !opts[:'client'].nil?
  query_params[:'all'] = opts[:'all'] if !opts[:'all'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"OAuth2Api.revoke_o_auth2_consent_sessions",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OAuth2Api#revoke_o_auth2_consent_sessions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#revoke_o_auth2_login_sessions(opts = {}) ⇒ nil

Revokes OAuth 2.0 Login Sessions by either a Subject or a SessionID This endpoint invalidates authentication sessions. After revoking the authentication session(s), the subject has to re-authenticate at the Ory OAuth2 Provider. This endpoint does not invalidate any tokens. If you send the subject in a query param, all authentication sessions that belong to that subject are revoked. No OpenID Connect Front- or Back-channel logout is performed in this case. Alternatively, you can send a SessionID via ‘sid` query param, in which case, only the session that is connected to that SessionID is revoked. OpenID Connect Back-channel logout is performed in this case.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :subject (String)

    OAuth 2.0 Subject The subject to revoke authentication sessions for.

  • :sid (String)

    OAuth 2.0 Subject The subject to revoke authentication sessions for.

Returns:

  • (nil)


1594
1595
1596
1597
# File 'lib/ory-hydra-client/api/o_auth2_api.rb', line 1594

def (opts = {})
  (opts)
  nil
end

#revoke_o_auth2_login_sessions_with_http_info(opts = {}) ⇒ Array<(nil, Integer, Hash)>

Revokes OAuth 2.0 Login Sessions by either a Subject or a SessionID This endpoint invalidates authentication sessions. After revoking the authentication session(s), the subject has to re-authenticate at the Ory OAuth2 Provider. This endpoint does not invalidate any tokens. If you send the subject in a query param, all authentication sessions that belong to that subject are revoked. No OpenID Connect Front- or Back-channel logout is performed in this case. Alternatively, you can send a SessionID via &#x60;sid&#x60; query param, in which case, only the session that is connected to that SessionID is revoked. OpenID Connect Back-channel logout is performed in this case.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :subject (String)

    OAuth 2.0 Subject The subject to revoke authentication sessions for.

  • :sid (String)

    OAuth 2.0 Subject The subject to revoke authentication sessions for.

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
# File 'lib/ory-hydra-client/api/o_auth2_api.rb', line 1605

def (opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: OAuth2Api.revoke_o_auth2_login_sessions ...'
  end
  # resource path
  local_var_path = '/admin/oauth2/auth/sessions/login'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'subject'] = opts[:'subject'] if !opts[:'subject'].nil?
  query_params[:'sid'] = opts[:'sid'] if !opts[:'sid'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"OAuth2Api.revoke_o_auth2_login_sessions",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OAuth2Api#revoke_o_auth2_login_sessions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#revoke_o_auth2_token(token, opts = {}) ⇒ nil

Revoke OAuth 2.0 Access or Refresh Token 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.

Parameters:

  • token (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :client_id (String)
  • :client_secret (String)

Returns:

  • (nil)


1658
1659
1660
1661
# File 'lib/ory-hydra-client/api/o_auth2_api.rb', line 1658

def revoke_o_auth2_token(token, opts = {})
  revoke_o_auth2_token_with_http_info(token, opts)
  nil
end

#revoke_o_auth2_token_with_http_info(token, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Revoke OAuth 2.0 Access or Refresh Token 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.

Parameters:

  • token (String)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :client_id (String)
  • :client_secret (String)

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
# File 'lib/ory-hydra-client/api/o_auth2_api.rb', line 1670

def revoke_o_auth2_token_with_http_info(token, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: OAuth2Api.revoke_o_auth2_token ...'
  end
  # verify the required parameter 'token' is set
  if @api_client.config.client_side_validation && token.nil?
    fail ArgumentError, "Missing the required parameter 'token' when calling OAuth2Api.revoke_o_auth2_token"
  end
  # resource path
  local_var_path = '/oauth2/revoke'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}
  form_params['token'] = token
  form_params['client_id'] = opts[:'client_id'] if !opts[:'client_id'].nil?
  form_params['client_secret'] = opts[:'client_secret'] if !opts[:'client_secret'].nil?

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basic', 'oauth2']

  new_options = opts.merge(
    :operation => :"OAuth2Api.revoke_o_auth2_token",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OAuth2Api#revoke_o_auth2_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#set_o_auth2_client(id, o_auth2_client, opts = {}) ⇒ OAuth2Client

Set OAuth 2.0 Client Replaces an existing OAuth 2.0 Client with the payload you send. If you pass ‘client_secret` the secret is used, otherwise the existing secret is used. If set, the secret is echoed in the response. It is not possible to retrieve it later on. OAuth 2.0 Clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.

Parameters:

  • id (String)

    OAuth 2.0 Client ID

  • o_auth2_client (OAuth2Client)

    OAuth 2.0 Client Request Body

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

    the optional parameters

Returns:



1732
1733
1734
1735
# File 'lib/ory-hydra-client/api/o_auth2_api.rb', line 1732

def set_o_auth2_client(id, o_auth2_client, opts = {})
  data, _status_code, _headers = set_o_auth2_client_with_http_info(id, o_auth2_client, opts)
  data
end

#set_o_auth2_client_lifespans(id, opts = {}) ⇒ OAuth2Client

Set OAuth2 Client Token Lifespans Set lifespans of different token types issued for this OAuth 2.0 client. Does not modify other fields.

Parameters:

  • id (String)

    OAuth 2.0 Client ID

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

    the optional parameters

Options Hash (opts):

Returns:



1806
1807
1808
1809
# File 'lib/ory-hydra-client/api/o_auth2_api.rb', line 1806

def set_o_auth2_client_lifespans(id, opts = {})
  data, _status_code, _headers = set_o_auth2_client_lifespans_with_http_info(id, opts)
  data
end

#set_o_auth2_client_lifespans_with_http_info(id, opts = {}) ⇒ Array<(OAuth2Client, Integer, Hash)>

Set OAuth2 Client Token Lifespans Set lifespans of different token types issued for this OAuth 2.0 client. Does not modify other fields.

Parameters:

  • id (String)

    OAuth 2.0 Client ID

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

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(OAuth2Client, Integer, Hash)>)

    OAuth2Client data, response status code and response headers



1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
# File 'lib/ory-hydra-client/api/o_auth2_api.rb', line 1817

def set_o_auth2_client_lifespans_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: OAuth2Api.set_o_auth2_client_lifespans ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling OAuth2Api.set_o_auth2_client_lifespans"
  end
  # resource path
  local_var_path = '/admin/clients/{id}/lifespans'.sub('{' + 'id' + '}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'o_auth2_client_token_lifespans'])

  # return_type
  return_type = opts[:debug_return_type] || 'OAuth2Client'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"OAuth2Api.set_o_auth2_client_lifespans",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OAuth2Api#set_o_auth2_client_lifespans\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#set_o_auth2_client_with_http_info(id, o_auth2_client, opts = {}) ⇒ Array<(OAuth2Client, Integer, Hash)>

Set OAuth 2.0 Client Replaces an existing OAuth 2.0 Client with the payload you send. If you pass &#x60;client_secret&#x60; the secret is used, otherwise the existing secret is used. If set, the secret is echoed in the response. It is not possible to retrieve it later on. OAuth 2.0 Clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.

Parameters:

  • id (String)

    OAuth 2.0 Client ID

  • o_auth2_client (OAuth2Client)

    OAuth 2.0 Client Request Body

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

    the optional parameters

Returns:

  • (Array<(OAuth2Client, Integer, Hash)>)

    OAuth2Client data, response status code and response headers



1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
# File 'lib/ory-hydra-client/api/o_auth2_api.rb', line 1743

def set_o_auth2_client_with_http_info(id, o_auth2_client, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: OAuth2Api.set_o_auth2_client ...'
  end
  # verify the required parameter 'id' is set
  if @api_client.config.client_side_validation && id.nil?
    fail ArgumentError, "Missing the required parameter 'id' when calling OAuth2Api.set_o_auth2_client"
  end
  # verify the required parameter 'o_auth2_client' is set
  if @api_client.config.client_side_validation && o_auth2_client.nil?
    fail ArgumentError, "Missing the required parameter 'o_auth2_client' when calling OAuth2Api.set_o_auth2_client"
  end
  # resource path
  local_var_path = '/admin/clients/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(o_auth2_client)

  # return_type
  return_type = opts[:debug_return_type] || 'OAuth2Client'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"OAuth2Api.set_o_auth2_client",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OAuth2Api#set_o_auth2_client\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#trust_o_auth2_jwt_grant_issuer(opts = {}) ⇒ TrustedOAuth2JwtGrantIssuer

Trust OAuth2 JWT Bearer Grant Type Issuer Use this endpoint to establish a trust relationship for a JWT issuer to perform JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grants [RFC7523](datatracker.ietf.org/doc/html/rfc7523).

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:



1875
1876
1877
1878
# File 'lib/ory-hydra-client/api/o_auth2_api.rb', line 1875

def trust_o_auth2_jwt_grant_issuer(opts = {})
  data, _status_code, _headers = trust_o_auth2_jwt_grant_issuer_with_http_info(opts)
  data
end

#trust_o_auth2_jwt_grant_issuer_with_http_info(opts = {}) ⇒ Array<(TrustedOAuth2JwtGrantIssuer, Integer, Hash)>

Trust OAuth2 JWT Bearer Grant Type Issuer Use this endpoint to establish a trust relationship for a JWT issuer to perform JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grants [RFC7523](datatracker.ietf.org/doc/html/rfc7523).

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(TrustedOAuth2JwtGrantIssuer, Integer, Hash)>)

    TrustedOAuth2JwtGrantIssuer data, response status code and response headers



1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
# File 'lib/ory-hydra-client/api/o_auth2_api.rb', line 1885

def trust_o_auth2_jwt_grant_issuer_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: OAuth2Api.trust_o_auth2_jwt_grant_issuer ...'
  end
  # resource path
  local_var_path = '/admin/trust/grants/jwt-bearer/issuers'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'trust_o_auth2_jwt_grant_issuer'])

  # return_type
  return_type = opts[:debug_return_type] || 'TrustedOAuth2JwtGrantIssuer'

  # auth_names
  auth_names = opts[:debug_auth_names] || []

  new_options = opts.merge(
    :operation => :"OAuth2Api.trust_o_auth2_jwt_grant_issuer",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: OAuth2Api#trust_o_auth2_jwt_grant_issuer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end