Class: OryHydraClient::AdminApi

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ AdminApi

Returns a new instance of AdminApi.



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

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

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



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

def api_client
  @api_client
end

Instance Method Details

Accept a consent request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope ("Application my-dropbox-app wants write access to all your private files"). 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 Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra 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.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:



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

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

Accept a consent request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope ("Application my-dropbox-app wants write access to all your private files"). 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 Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra 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.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:

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

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

def accept_consent_request_with_http_info(consent_challenge, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AdminApi.accept_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 AdminApi.accept_consent_request"
  end
  # resource path
  local_var_path = '/oauth2/auth/requests/consent/accept'

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

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

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

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

  # return_type
  return_type = opts[:return_type] || 'CompletedRequest' 

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

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

#accept_login_request(login_challenge, opts = {}) ⇒ CompletedRequest

Accept a login request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called "identity provider") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. This endpoint tells ORY Hydra that the subject has successfully authenticated and includes additional information such as the subject’s ID and if ORY Hydra 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)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



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

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

#accept_login_request_with_http_info(login_challenge, opts = {}) ⇒ Array<(CompletedRequest, Integer, Hash)>

Accept a login request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called &quot;identity provider&quot;) to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. This endpoint tells ORY Hydra that the subject has successfully authenticated and includes additional information such as the subject&#39;s ID and if ORY Hydra 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)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

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

    CompletedRequest data, response status code and response headers



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
153
154
# File 'lib/ory-hydra-client/api/admin_api.rb', line 106

def (, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AdminApi.accept_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 AdminApi.accept_login_request"
  end
  # resource path
  local_var_path = '/oauth2/auth/requests/login/accept'

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

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

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

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

  # return_type
  return_type = opts[:return_type] || 'CompletedRequest' 

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

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

#accept_logout_request(logout_challenge, opts = {}) ⇒ CompletedRequest

Accept a logout request When a user or an application requests ORY Hydra to log out a user, this endpoint is used to confirm that logout request. No body is required. The response contains a redirect URL which the consent provider should redirect the user-agent to.

Parameters:

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

    the optional parameters

Returns:



161
162
163
164
# File 'lib/ory-hydra-client/api/admin_api.rb', line 161

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

#accept_logout_request_with_http_info(logout_challenge, opts = {}) ⇒ Array<(CompletedRequest, Integer, Hash)>

Accept a logout request When a user or an application requests ORY Hydra to log out a user, this endpoint is used to confirm that logout request. No body is required. The response contains a redirect URL which the consent provider should redirect the user-agent to.

Parameters:

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

    the optional parameters

Returns:

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

    CompletedRequest data, response status code and response headers



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
216
217
# File 'lib/ory-hydra-client/api/admin_api.rb', line 171

def accept_logout_request_with_http_info(logout_challenge, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AdminApi.accept_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 AdminApi.accept_logout_request"
  end
  # resource path
  local_var_path = '/oauth2/auth/requests/logout/accept'

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

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

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

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

  # return_type
  return_type = opts[:return_type] || 'CompletedRequest' 

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

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

#create_json_web_key_set(set, opts = {}) ⇒ JSONWebKeySet

Generate a new JSON Web Key This endpoint is capable of generating JSON Web Key Sets for you. There a different strategies available, such as symmetric cryptographic keys (HS256, HS512) and asymetric cryptographic keys (RS256, ECDSA). If the specified JSON Web Key Set does not exist, it will be created. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.

Parameters:

  • set (String)

    The set

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

    the optional parameters

Options Hash (opts):

Returns:



225
226
227
228
# File 'lib/ory-hydra-client/api/admin_api.rb', line 225

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

#create_json_web_key_set_with_http_info(set, opts = {}) ⇒ Array<(JSONWebKeySet, Integer, Hash)>

Generate a new JSON Web Key This endpoint is capable of generating JSON Web Key Sets for you. There a different strategies available, such as symmetric cryptographic keys (HS256, HS512) and asymetric cryptographic keys (RS256, ECDSA). If the specified JSON Web Key Set does not exist, it will be created. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.

Parameters:

  • set (String)

    The set

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

    the optional parameters

Options Hash (opts):

Returns:

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

    JSONWebKeySet data, response status code and response headers



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
273
274
275
276
277
278
279
280
281
282
283
# File 'lib/ory-hydra-client/api/admin_api.rb', line 236

def create_json_web_key_set_with_http_info(set, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AdminApi.create_json_web_key_set ...'
  end
  # verify the required parameter 'set' is set
  if @api_client.config.client_side_validation && set.nil?
    fail ArgumentError, "Missing the required parameter 'set' when calling AdminApi.create_json_web_key_set"
  end
  # resource path
  local_var_path = '/keys/{set}'.sub('{' + 'set' + '}', CGI.escape(set.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'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

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

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

  # return_type
  return_type = opts[:return_type] || 'JSONWebKeySet' 

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

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

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

Create an OAuth 2.0 client Create a new OAuth 2.0 client If you pass ‘client_secret` the secret will be used, otherwise a random secret will be generated. The 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 somwhere 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. To manage ORY Hydra, you will need an OAuth 2.0 Client as well. Make sure that this endpoint is well protected and only callable by first-party components.

Parameters:

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

    the optional parameters

Returns:



290
291
292
293
# File 'lib/ory-hydra-client/api/admin_api.rb', line 290

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

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

Create an OAuth 2.0 client Create a new OAuth 2.0 client If you pass &#x60;client_secret&#x60; the secret will be used, otherwise a random secret will be generated. The 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 somwhere 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. To manage ORY Hydra, you will need an OAuth 2.0 Client as well. Make sure that this endpoint is well protected and only callable by first-party components.

Parameters:

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

    the optional parameters

Returns:

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

    OAuth2Client data, response status code and response headers



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
336
337
338
339
340
341
342
343
344
345
346
347
# File 'lib/ory-hydra-client/api/admin_api.rb', line 300

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

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

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

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

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

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

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

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

#delete_json_web_key(kid, set, opts = {}) ⇒ nil

Delete a JSON Web Key Use this endpoint to delete a single JSON Web Key. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.

Parameters:

  • kid (String)

    The kid of the desired key

  • set (String)

    The set

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

    the optional parameters

Returns:

  • (nil)


355
356
357
358
# File 'lib/ory-hydra-client/api/admin_api.rb', line 355

def delete_json_web_key(kid, set, opts = {})
  delete_json_web_key_with_http_info(kid, set, opts)
  nil
end

#delete_json_web_key_set(set, opts = {}) ⇒ nil

Delete a JSON Web Key Set Use this endpoint to delete a complete JSON Web Key Set and all the keys in that set. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.

Parameters:

  • set (String)

    The set

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

    the optional parameters

Returns:

  • (nil)


422
423
424
425
# File 'lib/ory-hydra-client/api/admin_api.rb', line 422

def delete_json_web_key_set(set, opts = {})
  delete_json_web_key_set_with_http_info(set, opts)
  nil
end

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

Delete a JSON Web Key Set Use this endpoint to delete a complete JSON Web Key Set and all the keys in that set. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.

Parameters:

  • set (String)

    The set

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
# File 'lib/ory-hydra-client/api/admin_api.rb', line 432

def delete_json_web_key_set_with_http_info(set, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AdminApi.delete_json_web_key_set ...'
  end
  # verify the required parameter 'set' is set
  if @api_client.config.client_side_validation && set.nil?
    fail ArgumentError, "Missing the required parameter 'set' when calling AdminApi.delete_json_web_key_set"
  end
  # resource path
  local_var_path = '/keys/{set}'.sub('{' + 'set' + '}', CGI.escape(set.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[:body] 

  # return_type
  return_type = opts[:return_type] 

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

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

#delete_json_web_key_with_http_info(kid, set, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete a JSON Web Key Use this endpoint to delete a single JSON Web Key. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.

Parameters:

  • kid (String)

    The kid of the desired key

  • set (String)

    The set

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
# File 'lib/ory-hydra-client/api/admin_api.rb', line 366

def delete_json_web_key_with_http_info(kid, set, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AdminApi.delete_json_web_key ...'
  end
  # verify the required parameter 'kid' is set
  if @api_client.config.client_side_validation && kid.nil?
    fail ArgumentError, "Missing the required parameter 'kid' when calling AdminApi.delete_json_web_key"
  end
  # verify the required parameter 'set' is set
  if @api_client.config.client_side_validation && set.nil?
    fail ArgumentError, "Missing the required parameter 'set' when calling AdminApi.delete_json_web_key"
  end
  # resource path
  local_var_path = '/keys/{set}/{kid}'.sub('{' + 'kid' + '}', CGI.escape(kid.to_s)).sub('{' + 'set' + '}', CGI.escape(set.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[:body] 

  # return_type
  return_type = opts[:return_type] 

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

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

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

Deletes an 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. To manage ORY Hydra, you will need an OAuth 2.0 Client as well. 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)


484
485
486
487
# File 'lib/ory-hydra-client/api/admin_api.rb', line 484

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

Deletes an 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. To manage ORY Hydra, you will need an OAuth 2.0 Client as well. 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



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
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
# File 'lib/ory-hydra-client/api/admin_api.rb', line 494

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

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

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

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

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

  # return_type
  return_type = opts[:return_type] 

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

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

#flush_inactive_o_auth2_tokens(opts = {}) ⇒ nil

Flush Expired OAuth2 Access Tokens This endpoint flushes expired OAuth2 access tokens from the database. You can set a time after which no tokens will be not be touched, in case you want to keep recent tokens for auditing. Refresh tokens can not be flushed as they are deleted automatically when performing the refresh flow.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:

  • (nil)


546
547
548
549
# File 'lib/ory-hydra-client/api/admin_api.rb', line 546

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

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

Flush Expired OAuth2 Access Tokens This endpoint flushes expired OAuth2 access tokens from the database. You can set a time after which no tokens will be not be touched, in case you want to keep recent tokens for auditing. Refresh tokens can not be flushed as they are deleted automatically when performing the refresh flow.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:

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

    nil, response status code and response headers



556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
# File 'lib/ory-hydra-client/api/admin_api.rb', line 556

def flush_inactive_o_auth2_tokens_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AdminApi.flush_inactive_o_auth2_tokens ...'
  end
  # resource path
  local_var_path = '/oauth2/flush'

  # 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'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

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

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

  # return_type
  return_type = opts[:return_type] 

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

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

Get consent request information When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope ("Application my-dropbox-app wants write access to all your private files"). 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 Hydra if the subject accepted or rejected the request.

Parameters:

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

    the optional parameters

Returns:



606
607
608
609
# File 'lib/ory-hydra-client/api/admin_api.rb', line 606

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

Get consent request information When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (&quot;Application my-dropbox-app wants write access to all your private files&quot;). 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 Hydra if the subject accepted or rejected the request.

Parameters:

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

    the optional parameters

Returns:

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

    ConsentRequest data, response status code and response headers



616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
# File 'lib/ory-hydra-client/api/admin_api.rb', line 616

def get_consent_request_with_http_info(consent_challenge, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AdminApi.get_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 AdminApi.get_consent_request"
  end
  # resource path
  local_var_path = '/oauth2/auth/requests/consent'

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

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

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

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

  # return_type
  return_type = opts[:return_type] || 'ConsentRequest' 

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

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

#get_json_web_key(kid, set, opts = {}) ⇒ JSONWebKeySet

Fetch a JSON Web Key This endpoint returns a singular JSON Web Key, identified by the set and the specific key ID (kid).

Parameters:

  • kid (String)

    The kid of the desired key

  • set (String)

    The set

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

    the optional parameters

Returns:



670
671
672
673
# File 'lib/ory-hydra-client/api/admin_api.rb', line 670

def get_json_web_key(kid, set, opts = {})
  data, _status_code, _headers = get_json_web_key_with_http_info(kid, set, opts)
  data
end

#get_json_web_key_set(set, opts = {}) ⇒ JSONWebKeySet

Retrieve a JSON Web Key Set This endpoint can be used to retrieve JWK Sets stored in ORY Hydra. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.

Parameters:

  • set (String)

    The set

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

    the optional parameters

Returns:



737
738
739
740
# File 'lib/ory-hydra-client/api/admin_api.rb', line 737

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

#get_json_web_key_set_with_http_info(set, opts = {}) ⇒ Array<(JSONWebKeySet, Integer, Hash)>

Retrieve a JSON Web Key Set This endpoint can be used to retrieve JWK Sets stored in ORY Hydra. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.

Parameters:

  • set (String)

    The set

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

    the optional parameters

Returns:

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

    JSONWebKeySet data, response status code and response headers



747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
# File 'lib/ory-hydra-client/api/admin_api.rb', line 747

def get_json_web_key_set_with_http_info(set, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AdminApi.get_json_web_key_set ...'
  end
  # verify the required parameter 'set' is set
  if @api_client.config.client_side_validation && set.nil?
    fail ArgumentError, "Missing the required parameter 'set' when calling AdminApi.get_json_web_key_set"
  end
  # resource path
  local_var_path = '/keys/{set}'.sub('{' + 'set' + '}', CGI.escape(set.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[:body] 

  # return_type
  return_type = opts[:return_type] || 'JSONWebKeySet' 

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

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

#get_json_web_key_with_http_info(kid, set, opts = {}) ⇒ Array<(JSONWebKeySet, Integer, Hash)>

Fetch a JSON Web Key This endpoint returns a singular JSON Web Key, identified by the set and the specific key ID (kid).

Parameters:

  • kid (String)

    The kid of the desired key

  • set (String)

    The set

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

    the optional parameters

Returns:

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

    JSONWebKeySet data, response status code and response headers



681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
# File 'lib/ory-hydra-client/api/admin_api.rb', line 681

def get_json_web_key_with_http_info(kid, set, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AdminApi.get_json_web_key ...'
  end
  # verify the required parameter 'kid' is set
  if @api_client.config.client_side_validation && kid.nil?
    fail ArgumentError, "Missing the required parameter 'kid' when calling AdminApi.get_json_web_key"
  end
  # verify the required parameter 'set' is set
  if @api_client.config.client_side_validation && set.nil?
    fail ArgumentError, "Missing the required parameter 'set' when calling AdminApi.get_json_web_key"
  end
  # resource path
  local_var_path = '/keys/{set}/{kid}'.sub('{' + 'kid' + '}', CGI.escape(kid.to_s)).sub('{' + 'set' + '}', CGI.escape(set.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[:body] 

  # return_type
  return_type = opts[:return_type] || 'JSONWebKeySet' 

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

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

#get_login_request(login_challenge, opts = {}) ⇒ LoginRequest

Get a login request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called "identity provider") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



799
800
801
802
# File 'lib/ory-hydra-client/api/admin_api.rb', line 799

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

#get_login_request_with_http_info(login_challenge, opts = {}) ⇒ Array<(LoginRequest, Integer, Hash)>

Get a login request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called &quot;identity provider&quot;) to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    LoginRequest data, response status code and response headers



809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
# File 'lib/ory-hydra-client/api/admin_api.rb', line 809

def (, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AdminApi.get_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 AdminApi.get_login_request"
  end
  # resource path
  local_var_path = '/oauth2/auth/requests/login'

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

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

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

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

  # return_type
  return_type = opts[:return_type] || 'LoginRequest' 

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

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

#get_logout_request(logout_challenge, opts = {}) ⇒ LogoutRequest

Get a logout request Use this endpoint to fetch a logout request.

Parameters:

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

    the optional parameters

Returns:



862
863
864
865
# File 'lib/ory-hydra-client/api/admin_api.rb', line 862

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

#get_logout_request_with_http_info(logout_challenge, opts = {}) ⇒ Array<(LogoutRequest, Integer, Hash)>

Get a logout request Use this endpoint to fetch a logout request.

Parameters:

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

    the optional parameters

Returns:

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

    LogoutRequest data, response status code and response headers



872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
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
# File 'lib/ory-hydra-client/api/admin_api.rb', line 872

def get_logout_request_with_http_info(logout_challenge, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AdminApi.get_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 AdminApi.get_logout_request"
  end
  # resource path
  local_var_path = '/oauth2/auth/requests/logout'

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

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

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

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

  # return_type
  return_type = opts[:return_type] || 'LogoutRequest' 

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

  new_options = opts.merge(
    :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: AdminApi#get_logout_request\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 passwords. 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. To manage ORY Hydra, you will need an OAuth 2.0 Client as well. 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:



925
926
927
928
# File 'lib/ory-hydra-client/api/admin_api.rb', line 925

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 passwords. 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. To manage ORY Hydra, you will need an OAuth 2.0 Client as well. 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<(OAuth2Client, Integer, Hash)>)

    OAuth2Client data, response status code and response headers



935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
# File 'lib/ory-hydra-client/api/admin_api.rb', line 935

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

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

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

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

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

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

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

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

#get_version(opts = {}) ⇒ Version

Get service version This endpoint returns the service version typically notated using semantic versioning. If the service supports TLS Edge Termination, this endpoint does not require the ‘X-Forwarded-Proto` header to be set.

Parameters:

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

    the optional parameters

Returns:



986
987
988
989
# File 'lib/ory-hydra-client/api/admin_api.rb', line 986

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

#get_version_with_http_info(opts = {}) ⇒ Array<(Version, Integer, Hash)>

Get service version This endpoint returns the service version typically notated using semantic versioning. If the service supports TLS Edge Termination, this endpoint does not require the &#x60;X-Forwarded-Proto&#x60; header to be set.

Parameters:

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

    the optional parameters

Returns:

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

    Version data, response status code and response headers



995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
# File 'lib/ory-hydra-client/api/admin_api.rb', line 995

def get_version_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AdminApi.get_version ...'
  end
  # resource path
  local_var_path = '/version'

  # 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[:body] 

  # return_type
  return_type = opts[:return_type] || 'Version' 

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

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

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

Introspect OAuth2 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 ‘accessTokenExtra` during the consent flow. For more information [read this blog post](www.oauth.com/oauth2-servers/token-introspection-endpoint/).

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:



1044
1045
1046
1047
# File 'lib/ory-hydra-client/api/admin_api.rb', line 1044

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<(OAuth2TokenIntrospection, Integer, Hash)>

Introspect OAuth2 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;accessTokenExtra&#x60; during the consent flow. For more information [read this blog post](www.oauth.com/oauth2-servers/token-introspection-endpoint/).

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<(OAuth2TokenIntrospection, Integer, Hash)>)

    OAuth2TokenIntrospection data, response status code and response headers



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

def introspect_o_auth2_token_with_http_info(token, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AdminApi.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 AdminApi.introspect_o_auth2_token"
  end
  # resource path
  local_var_path = '/oauth2/introspect'

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

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

  # 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[:body] 

  # return_type
  return_type = opts[:return_type] || 'OAuth2TokenIntrospection' 

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

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

#is_instance_alive(opts = {}) ⇒ HealthStatus

Check alive status This endpoint returns a 200 status code when the HTTP server is up running. This status does currently not include checks whether the database connection is working. If the service supports TLS Edge Termination, this endpoint does not require the ‘X-Forwarded-Proto` header to be set. Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance.

Parameters:

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

    the optional parameters

Returns:



1110
1111
1112
1113
# File 'lib/ory-hydra-client/api/admin_api.rb', line 1110

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

#is_instance_alive_with_http_info(opts = {}) ⇒ Array<(HealthStatus, Integer, Hash)>

Check alive status This endpoint returns a 200 status code when the HTTP server is up running. This status does currently not include checks whether the database connection is working. If the service supports TLS Edge Termination, this endpoint does not require the &#x60;X-Forwarded-Proto&#x60; header to be set. Be aware that if you are running multiple nodes of this service, the health status will never refer to the cluster state, only to a single instance.

Parameters:

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

    the optional parameters

Returns:

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

    HealthStatus data, response status code and response headers



1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
# File 'lib/ory-hydra-client/api/admin_api.rb', line 1119

def is_instance_alive_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AdminApi.is_instance_alive ...'
  end
  # resource path
  local_var_path = '/health/alive'

  # 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[:body] 

  # return_type
  return_type = opts[:return_type] || 'HealthStatus' 

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

  new_options = opts.merge(
    :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: AdminApi#is_instance_alive\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. 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. To manage ORY Hydra, you will need an OAuth 2.0 Client as well. Make sure that this endpoint is well protected and only callable by first-party components. The "Link" header is also included in successful responses, which contains one or more links for pagination, formatted like so: ‘<hydra-url/admin/clients?limit=limit&offset=offset>; rel="page"’, where page is one of the following applicable pages: ‘first’, ‘next’, ‘last’, and ‘previous’. Multiple links can be included in this header, and will be separated by a comma.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

    The maximum amount of policies returned.

  • :offset (Integer)

    The offset from where to start looking.

Returns:



1168
1169
1170
1171
# File 'lib/ory-hydra-client/api/admin_api.rb', line 1168

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. 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. To manage ORY Hydra, you will need an OAuth 2.0 Client as well. Make sure that this endpoint is well protected and only callable by first-party components. The &quot;Link&quot; header is also included in successful responses, which contains one or more links for pagination, formatted like so: &#39;&lt;hydra-url/admin/clients?limit&#x3D;limit&amp;offset&#x3D;offset&gt;; rel&#x3D;&quot;page&quot;&#39;, where page is one of the following applicable pages: &#39;first&#39;, &#39;next&#39;, &#39;last&#39;, and &#39;previous&#39;. Multiple links can be included in this header, and will be separated by a comma.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :limit (Integer)

    The maximum amount of policies returned.

  • :offset (Integer)

    The offset from where to start looking.

Returns:

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

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



1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
# File 'lib/ory-hydra-client/api/admin_api.rb', line 1179

def list_o_auth2_clients_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AdminApi.list_o_auth2_clients ...'
  end
  # resource path
  local_var_path = '/clients'

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

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

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

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

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

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

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

Lists all consent sessions of a subject This endpoint lists all subject’s granted consent sessions, including client and granted scope. The "Link" header is also included in successful responses, which contains one or more links for pagination, formatted like so: ‘<hydra-url/admin/oauth2/auth/sessions/consent?subject=user&limit=limit&offset=offset>; rel="page"’, where page is one of the following applicable pages: ‘first’, ‘next’, ‘last’, and ‘previous’. Multiple links can be included in this header, and will be separated by a comma.

Parameters:

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

    the optional parameters

Returns:



1229
1230
1231
1232
# File 'lib/ory-hydra-client/api/admin_api.rb', line 1229

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

Lists all consent sessions of a subject This endpoint lists all subject&#39;s granted consent sessions, including client and granted scope. The &quot;Link&quot; header is also included in successful responses, which contains one or more links for pagination, formatted like so: &#39;&lt;hydra-url/admin/oauth2/auth/sessions/consent?subject&#x3D;user&amp;limit&#x3D;limit&amp;offset&#x3D;offset&gt;; rel&#x3D;&quot;page&quot;&#39;, where page is one of the following applicable pages: &#39;first&#39;, &#39;next&#39;, &#39;last&#39;, and &#39;previous&#39;. Multiple links can be included in this header, and will be separated by a comma.

Parameters:

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

    the optional parameters

Returns:

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

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



1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
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
# File 'lib/ory-hydra-client/api/admin_api.rb', line 1239

def list_subject_consent_sessions_with_http_info(subject, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AdminApi.list_subject_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 AdminApi.list_subject_consent_sessions"
  end
  # resource path
  local_var_path = '/oauth2/auth/sessions/consent'

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

  # 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[:body] 

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

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

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

#prometheus(opts = {}) ⇒ nil

Get snapshot metrics from the Hydra service. If you’re using k8s, you can then add annotations to your deployment like so: “‘ metadata: annotations: prometheus.io/port: "4445" prometheus.io/path: "/metrics/prometheus" “`

Parameters:

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

    the optional parameters

Returns:

  • (nil)


1291
1292
1293
1294
# File 'lib/ory-hydra-client/api/admin_api.rb', line 1291

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

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

Get snapshot metrics from the Hydra service. If you&#39;re using k8s, you can then add annotations to your deployment like so: &#x60;&#x60;&#x60; metadata: annotations: prometheus.io/port: &quot;4445&quot; prometheus.io/path: &quot;/metrics/prometheus&quot; &#x60;&#x60;&#x60;

Parameters:

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
# File 'lib/ory-hydra-client/api/admin_api.rb', line 1300

def prometheus_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AdminApi.prometheus ...'
  end
  # resource path
  local_var_path = '/metrics/prometheus'

  # 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[:body] 

  # return_type
  return_type = opts[:return_type] 

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

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

Reject a consent request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope ("Application my-dropbox-app wants write access to all your private files"). 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 Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra 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.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:



1347
1348
1349
1350
# File 'lib/ory-hydra-client/api/admin_api.rb', line 1347

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

Reject a consent request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra 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 provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (&quot;Application my-dropbox-app wants write access to all your private files&quot;). 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 Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra 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.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:

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

    CompletedRequest data, response status code and response headers



1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
# File 'lib/ory-hydra-client/api/admin_api.rb', line 1358

def reject_consent_request_with_http_info(consent_challenge, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AdminApi.reject_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 AdminApi.reject_consent_request"
  end
  # resource path
  local_var_path = '/oauth2/auth/requests/consent/reject'

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

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

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

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

  # return_type
  return_type = opts[:return_type] || 'CompletedRequest' 

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

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

#reject_login_request(login_challenge, opts = {}) ⇒ CompletedRequest

Reject a login request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called "identity provider") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. This endpoint tells ORY Hydra that the subject has not authenticated and includes a reason why the authentication was be denied. The response contains a redirect URL which the login provider should redirect the user-agent to.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:



1414
1415
1416
1417
# File 'lib/ory-hydra-client/api/admin_api.rb', line 1414

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

#reject_login_request_with_http_info(login_challenge, opts = {}) ⇒ Array<(CompletedRequest, Integer, Hash)>

Reject a login request When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called &quot;identity provider&quot;) to authenticate the subject and then tell ORY Hydra now about it. The login provider is an 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. This endpoint tells ORY Hydra that the subject has not authenticated and includes a reason why the authentication was be denied. The response contains a redirect URL which the login provider should redirect the user-agent to.

Parameters:

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

    the optional parameters

Options Hash (opts):

Returns:

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

    CompletedRequest data, response status code and response headers



1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
# File 'lib/ory-hydra-client/api/admin_api.rb', line 1425

def (, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AdminApi.reject_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 AdminApi.reject_login_request"
  end
  # resource path
  local_var_path = '/oauth2/auth/requests/login/reject'

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

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

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

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

  # return_type
  return_type = opts[:return_type] || 'CompletedRequest' 

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

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

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

Reject a logout request When a user or an application requests ORY Hydra to log out a user, this endpoint is used to deny that logout request. No 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

Options Hash (opts):

Returns:

  • (nil)


1481
1482
1483
1484
# File 'lib/ory-hydra-client/api/admin_api.rb', line 1481

def reject_logout_request(logout_challenge, opts = {})
  reject_logout_request_with_http_info(logout_challenge, opts)
  nil
end

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

Reject a logout request When a user or an application requests ORY Hydra to log out a user, this endpoint is used to deny that logout request. No 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

Options Hash (opts):

Returns:

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

    nil, response status code and response headers



1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
# File 'lib/ory-hydra-client/api/admin_api.rb', line 1492

def reject_logout_request_with_http_info(logout_challenge, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AdminApi.reject_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 AdminApi.reject_logout_request"
  end
  # resource path
  local_var_path = '/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'])
  # HTTP header 'Content-Type'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded'])

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

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

  # return_type
  return_type = opts[:return_type] 

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

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

#revoke_authentication_session(subject, opts = {}) ⇒ nil

Invalidates all login sessions of a certain user Invalidates a subject’s authentication session This endpoint invalidates a subject’s authentication session. After revoking the authentication session, the subject has to re-authenticate at ORY Hydra. This endpoint does not invalidate any tokens and does not work with OpenID Connect Front- or Back-channel logout.

Parameters:

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

    the optional parameters

Returns:

  • (nil)


1547
1548
1549
1550
# File 'lib/ory-hydra-client/api/admin_api.rb', line 1547

def revoke_authentication_session(subject, opts = {})
  revoke_authentication_session_with_http_info(subject, opts)
  nil
end

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

Invalidates all login sessions of a certain user Invalidates a subject&#39;s authentication session This endpoint invalidates a subject&#39;s authentication session. After revoking the authentication session, the subject has to re-authenticate at ORY Hydra. This endpoint does not invalidate any tokens and does not work with OpenID Connect Front- or Back-channel logout.

Parameters:

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
# File 'lib/ory-hydra-client/api/admin_api.rb', line 1557

def revoke_authentication_session_with_http_info(subject, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AdminApi.revoke_authentication_session ...'
  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 AdminApi.revoke_authentication_session"
  end
  # resource path
  local_var_path = '/oauth2/auth/sessions/login'

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

  # 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[:body] 

  # return_type
  return_type = opts[:return_type] 

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

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

Revokes consent sessions of a subject for a specific OAuth 2.0 Client This endpoint revokes a subject’s granted consent sessions for a specific OAuth 2.0 Client and invalidates all associated OAuth 2.0 Access Tokens.

Parameters:

  • subject (String)

    The subject (Subject) who&#39;s consent sessions should be deleted.

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

    the optional parameters

Options Hash (opts):

  • :client (String)

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

Returns:

  • (nil)


1611
1612
1613
1614
# File 'lib/ory-hydra-client/api/admin_api.rb', line 1611

def revoke_consent_sessions(subject, opts = {})
  revoke_consent_sessions_with_http_info(subject, opts)
  nil
end

Revokes consent sessions of a subject for a specific OAuth 2.0 Client This endpoint revokes a subject&#39;s granted consent sessions for a specific OAuth 2.0 Client and invalidates all associated OAuth 2.0 Access Tokens.

Parameters:

  • subject (String)

    The subject (Subject) who&#39;s consent sessions should be deleted.

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

    the optional parameters

Options Hash (opts):

  • :client (String)

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

Returns:

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

    nil, response status code and response headers



1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
# File 'lib/ory-hydra-client/api/admin_api.rb', line 1622

def revoke_consent_sessions_with_http_info(subject, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AdminApi.revoke_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 AdminApi.revoke_consent_sessions"
  end
  # resource path
  local_var_path = '/oauth2/auth/sessions/consent'

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

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

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

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

  # return_type
  return_type = opts[:return_type] 

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

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

#update_json_web_key(kid, set, opts = {}) ⇒ JSONWebKey

Update a JSON Web Key Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your own. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.

Parameters:

  • kid (String)

    The kid of the desired key

  • set (String)

    The set

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

    the optional parameters

Options Hash (opts):

Returns:



1678
1679
1680
1681
# File 'lib/ory-hydra-client/api/admin_api.rb', line 1678

def update_json_web_key(kid, set, opts = {})
  data, _status_code, _headers = update_json_web_key_with_http_info(kid, set, opts)
  data
end

#update_json_web_key_set(set, opts = {}) ⇒ JSONWebKeySet

Update a JSON Web Key Set Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your own. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.

Parameters:

  • set (String)

    The set

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

    the optional parameters

Options Hash (opts):

Returns:



1749
1750
1751
1752
# File 'lib/ory-hydra-client/api/admin_api.rb', line 1749

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

#update_json_web_key_set_with_http_info(set, opts = {}) ⇒ Array<(JSONWebKeySet, Integer, Hash)>

Update a JSON Web Key Set Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your own. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.

Parameters:

  • set (String)

    The set

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

    the optional parameters

Options Hash (opts):

Returns:

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

    JSONWebKeySet data, response status code and response headers



1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
# File 'lib/ory-hydra-client/api/admin_api.rb', line 1760

def update_json_web_key_set_with_http_info(set, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AdminApi.update_json_web_key_set ...'
  end
  # verify the required parameter 'set' is set
  if @api_client.config.client_side_validation && set.nil?
    fail ArgumentError, "Missing the required parameter 'set' when calling AdminApi.update_json_web_key_set"
  end
  # resource path
  local_var_path = '/keys/{set}'.sub('{' + 'set' + '}', CGI.escape(set.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'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

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

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

  # return_type
  return_type = opts[:return_type] || 'JSONWebKeySet' 

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

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

#update_json_web_key_with_http_info(kid, set, opts = {}) ⇒ Array<(JSONWebKey, Integer, Hash)>

Update a JSON Web Key Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your own. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.

Parameters:

  • kid (String)

    The kid of the desired key

  • set (String)

    The set

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

    the optional parameters

Options Hash (opts):

Returns:

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

    JSONWebKey data, response status code and response headers



1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
# File 'lib/ory-hydra-client/api/admin_api.rb', line 1690

def update_json_web_key_with_http_info(kid, set, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AdminApi.update_json_web_key ...'
  end
  # verify the required parameter 'kid' is set
  if @api_client.config.client_side_validation && kid.nil?
    fail ArgumentError, "Missing the required parameter 'kid' when calling AdminApi.update_json_web_key"
  end
  # verify the required parameter 'set' is set
  if @api_client.config.client_side_validation && set.nil?
    fail ArgumentError, "Missing the required parameter 'set' when calling AdminApi.update_json_web_key"
  end
  # resource path
  local_var_path = '/keys/{set}/{kid}'.sub('{' + 'kid' + '}', CGI.escape(kid.to_s)).sub('{' + 'set' + '}', CGI.escape(set.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'
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])

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

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

  # return_type
  return_type = opts[:return_type] || 'JSONWebKey' 

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

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

#update_o_auth2_client(id, body, opts = {}) ⇒ OAuth2Client

Update an OAuth 2.0 Client Update an existing OAuth 2.0 Client. 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. To manage ORY Hydra, you will need an OAuth 2.0 Client as well. Make sure that this endpoint is well protected and only callable by first-party components.

Parameters:

  • id (String)
  • body (OAuth2Client)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1815
1816
1817
1818
# File 'lib/ory-hydra-client/api/admin_api.rb', line 1815

def update_o_auth2_client(id, body, opts = {})
  data, _status_code, _headers = update_o_auth2_client_with_http_info(id, body, opts)
  data
end

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

Update an OAuth 2.0 Client Update an existing OAuth 2.0 Client. 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. To manage ORY Hydra, you will need an OAuth 2.0 Client as well. Make sure that this endpoint is well protected and only callable by first-party components.

Parameters:

  • id (String)
  • body (OAuth2Client)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    OAuth2Client data, response status code and response headers



1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
# File 'lib/ory-hydra-client/api/admin_api.rb', line 1826

def update_o_auth2_client_with_http_info(id, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: AdminApi.update_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 AdminApi.update_o_auth2_client"
  end
  # verify the required parameter 'body' is set
  if @api_client.config.client_side_validation && body.nil?
    fail ArgumentError, "Missing the required parameter 'body' when calling AdminApi.update_o_auth2_client"
  end
  # resource path
  local_var_path = '/clients/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))

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

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

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

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

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

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

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