Class: OryClient::JwkApi

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ JwkApi

Returns a new instance of JwkApi.



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

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

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



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

def api_client
  @api_client
end

Instance Method Details

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

Create 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 JSON Web Key Set ID

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

    the optional parameters

Returns:



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

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

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

Create 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 JSON Web Key Set ID

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

    the optional parameters

Returns:

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

    JsonWebKeySet data, response status code and response headers



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

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

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

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

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

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

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

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

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

  • set (String)

    The JSON Web Key Set

  • kid (String)

    The JSON Web Key ID (kid)

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

    the optional parameters

Returns:

  • (nil)


102
103
104
105
# File 'lib/ory-client/api/jwk_api.rb', line 102

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

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

Delete 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 JSON Web Key Set

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

    the optional parameters

Returns:

  • (nil)


170
171
172
173
# File 'lib/ory-client/api/jwk_api.rb', line 170

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 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 JSON Web Key Set

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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

def delete_json_web_key_set_with_http_info(set, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: JwkApi.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 JwkApi.delete_json_web_key_set"
  end
  # resource path
  local_var_path = '/admin/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[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

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

  new_options = opts.merge(
    :operation => :"JwkApi.delete_json_web_key_set",
    :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: JwkApi#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(set, kid, opts = {}) ⇒ Array<(nil, Integer, Hash)>

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

  • set (String)

    The JSON Web Key Set

  • kid (String)

    The JSON Web Key ID (kid)

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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

def delete_json_web_key_with_http_info(set, kid, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: JwkApi.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 JwkApi.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 JwkApi.delete_json_web_key"
  end
  # resource path
  local_var_path = '/admin/keys/{set}/{kid}'.sub('{' + 'set' + '}', CGI.escape(set.to_s)).sub('{' + 'kid' + '}', CGI.escape(kid.to_s))

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

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

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

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

  # return_type
  return_type = opts[:debug_return_type]

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

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

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

Get JSON Web Key This endpoint returns a singular JSON Web Key contained in a set. It is identified by the set and the specific key ID (kid).

Parameters:

  • set (String)

    JSON Web Key Set ID

  • kid (String)

    JSON Web Key ID

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

    the optional parameters

Returns:



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

def get_json_web_key(set, kid, opts = {})
  data, _status_code, _headers = get_json_web_key_with_http_info(set, kid, 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)

    JSON Web Key Set ID

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

    the optional parameters

Returns:



302
303
304
305
# File 'lib/ory-client/api/jwk_api.rb', line 302

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)

    JSON Web Key Set ID

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

    the optional parameters

Returns:

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

    JsonWebKeySet data, response status code and response headers



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

def get_json_web_key_set_with_http_info(set, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: JwkApi.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 JwkApi.get_json_web_key_set"
  end
  # resource path
  local_var_path = '/admin/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[:debug_body]

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

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

  new_options = opts.merge(
    :operation => :"JwkApi.get_json_web_key_set",
    :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: JwkApi#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(set, kid, opts = {}) ⇒ Array<(JsonWebKeySet, Integer, Hash)>

Get JSON Web Key This endpoint returns a singular JSON Web Key contained in a set. It is identified by the set and the specific key ID (kid).

Parameters:

  • set (String)

    JSON Web Key Set ID

  • kid (String)

    JSON Web Key ID

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

    the optional parameters

Returns:

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

    JsonWebKeySet data, response status code and response headers



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

def get_json_web_key_with_http_info(set, kid, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: JwkApi.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 JwkApi.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 JwkApi.get_json_web_key"
  end
  # resource path
  local_var_path = '/admin/keys/{set}/{kid}'.sub('{' + 'set' + '}', CGI.escape(set.to_s)).sub('{' + 'kid' + '}', CGI.escape(kid.to_s))

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

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

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

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

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

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

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

#set_json_web_key(set, kid, opts = {}) ⇒ JsonWebKey

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

  • set (String)

    The JSON Web Key Set ID

  • kid (String)

    JSON Web Key ID

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

    the optional parameters

Options Hash (opts):

Returns:



367
368
369
370
# File 'lib/ory-client/api/jwk_api.rb', line 367

def set_json_web_key(set, kid, opts = {})
  data, _status_code, _headers = set_json_web_key_with_http_info(set, kid, opts)
  data
end

#set_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 JSON Web Key Set ID

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

    the optional parameters

Options Hash (opts):

Returns:



442
443
444
445
# File 'lib/ory-client/api/jwk_api.rb', line 442

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

#set_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 JSON Web Key Set ID

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

    the optional parameters

Options Hash (opts):

Returns:

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

    JsonWebKeySet data, response status code and response headers



453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
# File 'lib/ory-client/api/jwk_api.rb', line 453

def set_json_web_key_set_with_http_info(set, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: JwkApi.set_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 JwkApi.set_json_web_key_set"
  end
  # resource path
  local_var_path = '/admin/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'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

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

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

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

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

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

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

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

  • set (String)

    The JSON Web Key Set ID

  • kid (String)

    JSON Web Key ID

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

    the optional parameters

Options Hash (opts):

Returns:

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

    JsonWebKey data, response status code and response headers



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

def set_json_web_key_with_http_info(set, kid, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: JwkApi.set_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 JwkApi.set_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 JwkApi.set_json_web_key"
  end
  # resource path
  local_var_path = '/admin/keys/{set}/{kid}'.sub('{' + 'set' + '}', CGI.escape(set.to_s)).sub('{' + 'kid' + '}', CGI.escape(kid.to_s))

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

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

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

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

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

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

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