Class: OryClient::OidcApi

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ OidcApi

Returns a new instance of OidcApi.



19
20
21
# File 'lib/ory-client/api/oidc_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/oidc_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

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

Register OAuth2 Client using OpenID Dynamic Client Registration This endpoint behaves like the administrative counterpart (‘createOAuth2Client`) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This endpoint is disabled by default. It can be enabled by an administrator. Please note that using this endpoint you are not able to choose the `client_secret` nor the `client_id` as those values will be server generated when specifying `token_endpoint_auth_method` as `client_secret_basic` or `client_secret_post`. The `client_secret` will be returned in the response and you will not be able to retrieve it later on. Write the secret down and keep it somewhere safe.

Parameters:

  • o_auth2_client (OAuth2Client)

    Dynamic Client Registration Request Body

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

    the optional parameters

Returns:



27
28
29
30
# File 'lib/ory-client/api/oidc_api.rb', line 27

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

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

Register OAuth2 Client using OpenID Dynamic Client Registration This endpoint behaves like the administrative counterpart (&#x60;createOAuth2Client&#x60;) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This endpoint is disabled by default. It can be enabled by an administrator. Please note that using this endpoint you are not able to choose the &#x60;client_secret&#x60; nor the &#x60;client_id&#x60; as those values will be server generated when specifying &#x60;token_endpoint_auth_method&#x60; as &#x60;client_secret_basic&#x60; or &#x60;client_secret_post&#x60;. The &#x60;client_secret&#x60; will be returned in the response and you will not be able to retrieve it later on. Write the secret down and keep it somewhere safe.

Parameters:

  • o_auth2_client (OAuth2Client)

    Dynamic Client Registration Request Body

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

    the optional parameters

Returns:

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

    OAuth2Client data, response status code and response headers



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

def create_oidc_dynamic_client_with_http_info(o_auth2_client, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: OidcApi.create_oidc_dynamic_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 OidcApi.create_oidc_dynamic_client"
  end
  # resource path
  local_var_path = '/oauth2/register'

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

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

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

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

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

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

  new_options = opts.merge(
    :operation => :"OidcApi.create_oidc_dynamic_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: OidcApi#create_oidc_dynamic_client\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#create_verifiable_credential(opts = {}) ⇒ VerifiableCredentialResponse

Issues a Verifiable Credential This endpoint creates a verifiable credential that attests that the user authenticated with the provided access token owns a certain public/private key pair. More information can be found at openid.net/specs/openid-connect-userinfo-vc-1_0.html.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:



95
96
97
98
# File 'lib/ory-client/api/oidc_api.rb', line 95

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

#create_verifiable_credential_with_http_info(opts = {}) ⇒ Array<(VerifiableCredentialResponse, Integer, Hash)>

Issues a Verifiable Credential This endpoint creates a verifiable credential that attests that the user authenticated with the provided access token owns a certain public/private key pair. More information can be found at openid.net/specs/openid-connect-userinfo-vc-1_0.html.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:



105
106
107
108
109
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
# File 'lib/ory-client/api/oidc_api.rb', line 105

def create_verifiable_credential_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: OidcApi.create_verifiable_credential ...'
  end
  # resource path
  local_var_path = '/credentials'

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

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

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

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

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

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

  new_options = opts.merge(
    :operation => :"OidcApi.create_verifiable_credential",
    :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: OidcApi#create_verifiable_credential\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

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

Delete OAuth 2.0 Client using the OpenID Dynamic Client Registration Management Protocol This endpoint behaves like the administrative counterpart (‘deleteOAuth2Client`) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This endpoint is disabled by default. It can be enabled by an administrator. To use this endpoint, you will need to present the client’s authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method ‘client_secret_post`, you need to present the client secret in the URL query. If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header. 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:

  • (nil)


159
160
161
162
# File 'lib/ory-client/api/oidc_api.rb', line 159

def delete_oidc_dynamic_client(id, opts = {})
  delete_oidc_dynamic_client_with_http_info(id, opts)
  nil
end

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

Delete OAuth 2.0 Client using the OpenID Dynamic Client Registration Management Protocol This endpoint behaves like the administrative counterpart (&#x60;deleteOAuth2Client&#x60;) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This endpoint is disabled by default. It can be enabled by an administrator. To use this endpoint, you will need to present the client&#39;s authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method &#x60;client_secret_post&#x60;, you need to present the client secret in the URL query. If it uses &#x60;client_secret_basic&#x60;, present the Client ID and the Client Secret in the Authorization header. 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<(nil, Integer, Hash)>)

    nil, response status code and response headers



169
170
171
172
173
174
175
176
177
178
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
# File 'lib/ory-client/api/oidc_api.rb', line 169

def delete_oidc_dynamic_client_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: OidcApi.delete_oidc_dynamic_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 OidcApi.delete_oidc_dynamic_client"
  end
  # resource path
  local_var_path = '/oauth2/register/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))

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

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

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

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

  # return_type
  return_type = opts[:debug_return_type]

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

  new_options = opts.merge(
    :operation => :"OidcApi.delete_oidc_dynamic_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: OidcApi#delete_oidc_dynamic_client\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#discover_oidc_configuration(opts = {}) ⇒ OidcConfiguration

OpenID Connect Discovery A mechanism for an OpenID Connect Relying Party to discover the End-User’s OpenID Provider and obtain information needed to interact with it, including its OAuth 2.0 endpoint locations. Popular libraries for OpenID Connect clients include oidc-client-js (JavaScript), go-oidc (Golang), and others. For a full list of clients go here: openid.net/developers/certified/

Parameters:

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

    the optional parameters

Returns:



221
222
223
224
# File 'lib/ory-client/api/oidc_api.rb', line 221

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

#discover_oidc_configuration_with_http_info(opts = {}) ⇒ Array<(OidcConfiguration, Integer, Hash)>

OpenID Connect Discovery A mechanism for an OpenID Connect Relying Party to discover the End-User&#39;s OpenID Provider and obtain information needed to interact with it, including its OAuth 2.0 endpoint locations. Popular libraries for OpenID Connect clients include oidc-client-js (JavaScript), go-oidc (Golang), and others. For a full list of clients go here: openid.net/developers/certified/

Parameters:

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

    the optional parameters

Returns:

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

    OidcConfiguration data, response status code and response headers



230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
# File 'lib/ory-client/api/oidc_api.rb', line 230

def discover_oidc_configuration_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: OidcApi.discover_oidc_configuration ...'
  end
  # resource path
  local_var_path = '/.well-known/openid-configuration'

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

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

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

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

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

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

  new_options = opts.merge(
    :operation => :"OidcApi.discover_oidc_configuration",
    :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: OidcApi#discover_oidc_configuration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

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

Get OAuth2 Client using OpenID Dynamic Client Registration This endpoint behaves like the administrative counterpart (‘getOAuth2Client`) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. To use this endpoint, you will need to present the client’s authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method ‘client_secret_post`, you need to present the client secret in the URL query. If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header.

Parameters:

  • id (String)

    The id of the OAuth 2.0 Client.

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

    the optional parameters

Returns:



279
280
281
282
# File 'lib/ory-client/api/oidc_api.rb', line 279

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

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

Get OAuth2 Client using OpenID Dynamic Client Registration This endpoint behaves like the administrative counterpart (&#x60;getOAuth2Client&#x60;) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. To use this endpoint, you will need to present the client&#39;s authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method &#x60;client_secret_post&#x60;, you need to present the client secret in the URL query. If it uses &#x60;client_secret_basic&#x60;, present the Client ID and the Client Secret in the Authorization header.

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



289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
# File 'lib/ory-client/api/oidc_api.rb', line 289

def get_oidc_dynamic_client_with_http_info(id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: OidcApi.get_oidc_dynamic_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 OidcApi.get_oidc_dynamic_client"
  end
  # resource path
  local_var_path = '/oauth2/register/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))

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

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

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

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

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

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

  new_options = opts.merge(
    :operation => :"OidcApi.get_oidc_dynamic_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: OidcApi#get_oidc_dynamic_client\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_oidc_user_info(opts = {}) ⇒ OidcUserInfo

OpenID Connect Userinfo This endpoint returns the payload of the ID Token, including ‘session.id_token` values, of the provided OAuth 2.0 Access Token’s consent request. In the case of authentication error, a WWW-Authenticate header might be set in the response with more information about the error. See [the spec](datatracker.ietf.org/doc/html/rfc6750#section-3) for more details about header format.

Parameters:

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

    the optional parameters

Returns:



341
342
343
344
# File 'lib/ory-client/api/oidc_api.rb', line 341

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

#get_oidc_user_info_with_http_info(opts = {}) ⇒ Array<(OidcUserInfo, Integer, Hash)>

OpenID Connect Userinfo This endpoint returns the payload of the ID Token, including &#x60;session.id_token&#x60; values, of the provided OAuth 2.0 Access Token&#39;s consent request. In the case of authentication error, a WWW-Authenticate header might be set in the response with more information about the error. See [the spec](datatracker.ietf.org/doc/html/rfc6750#section-3) for more details about header format.

Parameters:

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

    the optional parameters

Returns:

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

    OidcUserInfo data, response status code and response headers



350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
# File 'lib/ory-client/api/oidc_api.rb', line 350

def (opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: OidcApi.get_oidc_user_info ...'
  end
  # resource path
  local_var_path = '/userinfo'

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

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

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

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

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

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

  new_options = opts.merge(
    :operation => :"OidcApi.get_oidc_user_info",
    :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: OidcApi#get_oidc_user_info\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#revoke_oidc_session(opts = {}) ⇒ nil

OpenID Connect Front- and Back-channel Enabled Logout This endpoint initiates and completes user logout at the Ory OAuth2 & OpenID provider and initiates OpenID Connect Front- / Back-channel logout: openid.net/specs/openid-connect-frontchannel-1_0.html openid.net/specs/openid-connect-backchannel-1_0.html Back-channel logout is performed asynchronously and does not affect logout flow.

Parameters:

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

    the optional parameters

Returns:

  • (nil)


398
399
400
401
# File 'lib/ory-client/api/oidc_api.rb', line 398

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

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

OpenID Connect Front- and Back-channel Enabled Logout This endpoint initiates and completes user logout at the Ory OAuth2 &amp; OpenID provider and initiates OpenID Connect Front- / Back-channel logout: openid.net/specs/openid-connect-frontchannel-1_0.html openid.net/specs/openid-connect-backchannel-1_0.html Back-channel logout is performed asynchronously and does not affect logout flow.

Parameters:

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
# File 'lib/ory-client/api/oidc_api.rb', line 407

def revoke_oidc_session_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: OidcApi.revoke_oidc_session ...'
  end
  # resource path
  local_var_path = '/oauth2/sessions/logout'

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

  # header parameters
  header_params = opts[:header_params] || {}

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

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

  # return_type
  return_type = opts[:debug_return_type]

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

  new_options = opts.merge(
    :operation => :"OidcApi.revoke_oidc_session",
    :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: OidcApi#revoke_oidc_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

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

Set OAuth2 Client using OpenID Dynamic Client Registration This endpoint behaves like the administrative counterpart (‘setOAuth2Client`) but is capable of facing the public internet directly to be used by third parties. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature is disabled per default. It can be enabled by a system administrator. 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. To use this endpoint, you will need to present the client’s authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method ‘client_secret_post`, you need to present the client secret in the URL query. If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header. 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:



455
456
457
458
# File 'lib/ory-client/api/oidc_api.rb', line 455

def set_oidc_dynamic_client(id, o_auth2_client, opts = {})
  data, _status_code, _headers = set_oidc_dynamic_client_with_http_info(id, o_auth2_client, opts)
  data
end

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

Set OAuth2 Client using OpenID Dynamic Client Registration This endpoint behaves like the administrative counterpart (&#x60;setOAuth2Client&#x60;) but is capable of facing the public internet directly to be used by third parties. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature is disabled per default. It can be enabled by a system administrator. 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. To use this endpoint, you will need to present the client&#39;s authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method &#x60;client_secret_post&#x60;, you need to present the client secret in the URL query. If it uses &#x60;client_secret_basic&#x60;, present the Client ID and the Client Secret in the Authorization header. 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



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
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
# File 'lib/ory-client/api/oidc_api.rb', line 466

def set_oidc_dynamic_client_with_http_info(id, o_auth2_client, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: OidcApi.set_oidc_dynamic_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 OidcApi.set_oidc_dynamic_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 OidcApi.set_oidc_dynamic_client"
  end
  # resource path
  local_var_path = '/oauth2/register/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))

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

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

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

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

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

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

  new_options = opts.merge(
    :operation => :"OidcApi.set_oidc_dynamic_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: OidcApi#set_oidc_dynamic_client\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end