Class: OryClient::OAuth2Api

Inherits:
Object
  • Object
show all
Defined in:
lib/ory-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-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-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-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-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']) unless header_params['Accept']
  # 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] || ['oryAccessToken']

  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-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-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']) unless header_params['Accept']
  # 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] || ['oryAccessToken']

  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-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-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']) unless header_params['Accept']

  # 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] || ['oryAccessToken']

  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

#accept_user_code_request(device_challenge, opts = {}) ⇒ OAuth2RedirectTo

Accepts a device grant user_code request Accepts a device grant user_code request

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:



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

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

#accept_user_code_request_with_http_info(device_challenge, opts = {}) ⇒ Array<(OAuth2RedirectTo, Integer, Hash)>

Accepts a device grant user_code request Accepts a device grant user_code request

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:

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

    OAuth2RedirectTo data, response status code and response headers



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

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

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

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # 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_device_user_code_request'])

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

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

  new_options = opts.merge(
    :operation => :"OAuth2Api.accept_user_code_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_user_code_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:



304
305
306
307
# File 'lib/ory-client/api/o_auth2_api.rb', line 304

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



314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
# File 'lib/ory-client/api/o_auth2_api.rb', line 314

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']) unless header_params['Accept']
  # 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] || ['oryAccessToken']

  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)


372
373
374
375
# File 'lib/ory-client/api/o_auth2_api.rb', line 372

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



382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
# File 'lib/ory-client/api/o_auth2_api.rb', line 382

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']) unless header_params['Accept']

  # 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] || ['oryAccessToken']

  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)


435
436
437
438
# File 'lib/ory-client/api/o_auth2_api.rb', line 435

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



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
485
486
487
488
489
490
491
492
# File 'lib/ory-client/api/o_auth2_api.rb', line 445

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']) unless header_params['Accept']

  # 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] || ['oryAccessToken']

  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)


499
500
501
502
# File 'lib/ory-client/api/o_auth2_api.rb', line 499

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



509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
# File 'lib/ory-client/api/o_auth2_api.rb', line 509

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']) unless header_params['Accept']

  # 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] || ['oryAccessToken']

  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:



562
563
564
565
# File 'lib/ory-client/api/o_auth2_api.rb', line 562

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



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
612
613
614
615
616
617
618
# File 'lib/ory-client/api/o_auth2_api.rb', line 572

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']) unless header_params['Accept']

  # 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] || ['oryAccessToken']

  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:



625
626
627
628
# File 'lib/ory-client/api/o_auth2_api.rb', line 625

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



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
676
677
678
679
680
681
682
# File 'lib/ory-client/api/o_auth2_api.rb', line 635

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']) unless header_params['Accept']

  # 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] || ['oryAccessToken']

  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:



689
690
691
692
# File 'lib/ory-client/api/o_auth2_api.rb', line 689

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



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
740
741
742
743
744
745
746
# File 'lib/ory-client/api/o_auth2_api.rb', line 699

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']) unless header_params['Accept']

  # 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] || ['oryAccessToken']

  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:



753
754
755
756
# File 'lib/ory-client/api/o_auth2_api.rb', line 753

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



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
803
804
805
806
807
808
809
810
# File 'lib/ory-client/api/o_auth2_api.rb', line 763

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']) unless header_params['Accept']

  # 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] || ['oryAccessToken']

  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:



817
818
819
820
# File 'lib/ory-client/api/o_auth2_api.rb', line 817

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



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

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']) unless header_params['Accept']

  # 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] || ['oryAccessToken']

  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:



881
882
883
884
# File 'lib/ory-client/api/o_auth2_api.rb', line 881

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



892
893
894
895
896
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
# File 'lib/ory-client/api/o_auth2_api.rb', line 892

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']) unless header_params['Accept']
  # 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] || ['oryAccessToken']

  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).

  • :client_name (String)

    The name of the clients to filter by.

  • :owner (String)

    The owner of the clients to filter by.

Returns:



955
956
957
958
# File 'lib/ory-client/api/o_auth2_api.rb', line 955

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).

  • :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



968
969
970
971
972
973
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
# File 'lib/ory-client/api/o_auth2_api.rb', line 968

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'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling OAuth2Api.list_o_auth2_clients, must be smaller than or equal to 1000.'
  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']) unless header_params['Accept']

  # 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] || ['oryAccessToken']

  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:



1032
1033
1034
1035
# File 'lib/ory-client/api/o_auth2_api.rb', line 1032

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



1045
1046
1047
1048
1049
1050
1051
1052
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
1099
1100
1101
1102
1103
# File 'lib/ory-client/api/o_auth2_api.rb', line 1045

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']) unless header_params['Accept']

  # 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] || ['oryAccessToken']

  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):

  • :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).

  • :issuer (String)

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

Returns:



1112
1113
1114
1115
# File 'lib/ory-client/api/o_auth2_api.rb', line 1112

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):

  • :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).

  • :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



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
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
# File 'lib/ory-client/api/o_auth2_api.rb', line 1124

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
  if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
    fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling OAuth2Api.list_trusted_o_auth2_jwt_grant_issuers, must be smaller than or equal to 1000.'
  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_trusted_o_auth2_jwt_grant_issuers, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = '/admin/trust/grants/jwt-bearer/issuers'

  # 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[:'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']) unless header_params['Accept']

  # 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] || ['oryAccessToken']

  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/ This endpoint should not be used via the Ory SDK and is only included for technical reasons. Instead, use one of the libraries linked above.

Parameters:

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

    the optional parameters

Returns:



1183
1184
1185
1186
# File 'lib/ory-client/api/o_auth2_api.rb', line 1183

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/ This endpoint should not be used via the Ory SDK and is only included for technical reasons. Instead, use one of the libraries linked above.

Parameters:

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

    the optional parameters

Returns:

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

    ErrorOAuth2 data, response status code and response headers



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

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']) unless header_params['Accept']

  # 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

#o_auth2_device_flow(opts = {}) ⇒ DeviceAuthorization

The OAuth 2.0 Device Authorize Endpoint This endpoint is not documented here because you should never use your own implementation to perform OAuth2 flows. OAuth2 is a very popular protocol and a library for your programming language will exists. To learn more about this flow please refer to the specification: tools.ietf.org/html/rfc8628

Parameters:

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

    the optional parameters

Returns:



1240
1241
1242
1243
# File 'lib/ory-client/api/o_auth2_api.rb', line 1240

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

#o_auth2_device_flow_with_http_info(opts = {}) ⇒ Array<(DeviceAuthorization, Integer, Hash)>

The OAuth 2.0 Device Authorize Endpoint This endpoint is not documented here because you should never use your own implementation to perform OAuth2 flows. OAuth2 is a very popular protocol and a library for your programming language will exists. To learn more about this flow please refer to the specification: tools.ietf.org/html/rfc8628

Parameters:

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

    the optional parameters

Returns:

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

    DeviceAuthorization data, response status code and response headers



1249
1250
1251
1252
1253
1254
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
# File 'lib/ory-client/api/o_auth2_api.rb', line 1249

def o_auth2_device_flow_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: OAuth2Api.o_auth2_device_flow ...'
  end
  # resource path
  local_var_path = '/oauth2/device/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']) unless header_params['Accept']

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

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

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

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

  new_options = opts.merge(
    :operation => :"OAuth2Api.o_auth2_device_flow",
    :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#o_auth2_device_flow\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/ This endpoint should not be used via the Ory SDK and is only included for technical reasons. Instead, use one of the libraries linked above.

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:



1302
1303
1304
1305
# File 'lib/ory-client/api/o_auth2_api.rb', line 1302

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/ This endpoint should not be used via the Ory SDK and is only included for technical reasons. Instead, use one of the libraries linked above.

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



1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
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
# File 'lib/ory-client/api/o_auth2_api.rb', line 1316

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']) unless header_params['Accept']
  # 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:



1380
1381
1382
1383
# File 'lib/ory-client/api/o_auth2_api.rb', line 1380

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



1391
1392
1393
1394
1395
1396
1397
1398
1399
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
# File 'lib/ory-client/api/o_auth2_api.rb', line 1391

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']) unless header_params['Accept']
  # 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] || ['oryAccessToken']

  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

#perform_o_auth2_device_verification_flow(opts = {}) ⇒ ErrorOAuth2

OAuth 2.0 Device Verification Endpoint This is the device user verification endpoint. The user is redirected here when trying to login using the device flow.

Parameters:

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

    the optional parameters

Returns:



1452
1453
1454
1455
# File 'lib/ory-client/api/o_auth2_api.rb', line 1452

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

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

OAuth 2.0 Device Verification Endpoint This is the device user verification endpoint. The user is redirected here when trying to login using the device flow.

Parameters:

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

    the optional parameters

Returns:

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

    ErrorOAuth2 data, response status code and response headers



1461
1462
1463
1464
1465
1466
1467
1468
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
# File 'lib/ory-client/api/o_auth2_api.rb', line 1461

def perform_o_auth2_device_verification_flow_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: OAuth2Api.perform_o_auth2_device_verification_flow ...'
  end
  # resource path
  local_var_path = '/oauth2/device/verify'

  # 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']) unless header_params['Accept']

  # 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.perform_o_auth2_device_verification_flow",
    :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#perform_o_auth2_device_verification_flow\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:



1511
1512
1513
1514
# File 'lib/ory-client/api/o_auth2_api.rb', line 1511

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



1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
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
# File 'lib/ory-client/api/o_auth2_api.rb', line 1522

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']) unless header_params['Accept']
  # 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] || ['oryAccessToken']

  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:



1582
1583
1584
1585
# File 'lib/ory-client/api/o_auth2_api.rb', line 1582

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



1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
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
# File 'lib/ory-client/api/o_auth2_api.rb', line 1593

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']) unless header_params['Accept']
  # 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] || ['oryAccessToken']

  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)


1652
1653
1654
1655
# File 'lib/ory-client/api/o_auth2_api.rb', line 1652

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



1662
1663
1664
1665
1666
1667
1668
1669
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
# File 'lib/ory-client/api/o_auth2_api.rb', line 1662

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']) unless header_params['Accept']

  # 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] || ['oryAccessToken']

  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:

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

    the optional parameters

Options Hash (opts):

  • :subject (String)

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

  • :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.

  • :consent_request_id (String)

    Consent Request ID If set, revoke all token chains derived from this particular consent request 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)


1719
1720
1721
1722
# File 'lib/ory-client/api/o_auth2_api.rb', line 1719

def revoke_o_auth2_consent_sessions(opts = {})
  revoke_o_auth2_consent_sessions_with_http_info(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:

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

    the optional parameters

Options Hash (opts):

  • :subject (String)

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

  • :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.

  • :consent_request_id (String)

    Consent Request ID If set, revoke all token chains derived from this particular consent request 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



1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
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
# File 'lib/ory-client/api/o_auth2_api.rb', line 1732

def revoke_o_auth2_consent_sessions_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: 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'] = opts[:'subject'] if !opts[:'subject'].nil?
  query_params[:'client'] = opts[:'client'] if !opts[:'client'].nil?
  query_params[:'consent_request_id'] = opts[:'consent_request_id'] if !opts[:'consent_request_id'].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']) unless header_params['Accept']

  # 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] || ['oryAccessToken']

  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. When using Ory for the identity provider, the login provider will also invalidate the session cookie.

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)

    Login Session ID The login session to revoke.

Returns:

  • (nil)


1786
1787
1788
1789
# File 'lib/ory-client/api/o_auth2_api.rb', line 1786

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. When using Ory for the identity provider, the login provider will also invalidate the session cookie.

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)

    Login Session ID The login session to revoke.

Returns:

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

    nil, response status code and response headers



1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
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
# File 'lib/ory-client/api/o_auth2_api.rb', line 1797

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']) unless header_params['Accept']

  # 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] || ['oryAccessToken']

  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)


1850
1851
1852
1853
# File 'lib/ory-client/api/o_auth2_api.rb', line 1850

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



1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
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
# File 'lib/ory-client/api/o_auth2_api.rb', line 1862

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']) unless header_params['Accept']
  # 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:



1924
1925
1926
1927
# File 'lib/ory-client/api/o_auth2_api.rb', line 1924

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:



1998
1999
2000
2001
# File 'lib/ory-client/api/o_auth2_api.rb', line 1998

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



2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
# File 'lib/ory-client/api/o_auth2_api.rb', line 2009

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']) unless header_params['Accept']
  # 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] || ['oryAccessToken']

  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



1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
# File 'lib/ory-client/api/o_auth2_api.rb', line 1935

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']) unless header_params['Accept']
  # 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] || ['oryAccessToken']

  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:



2067
2068
2069
2070
# File 'lib/ory-client/api/o_auth2_api.rb', line 2067

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



2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
# File 'lib/ory-client/api/o_auth2_api.rb', line 2077

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']) unless header_params['Accept']
  # 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] || ['oryAccessToken']

  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