Ory. Api. Jwk
(ory_client v1.22.66)
Copy Markdown
API calls for all endpoints tagged Jwk.
Summary
Functions
Create JSON Web Key
This endpoint is capable of generating JSON Web Key Sets for you. There are different strategies available, such as symmetric cryptographic keys (HS256, HS512) and asymmetric cryptographic keys (RS256, ECDSA). If the specified JSON Web Key Set does not exist, it will be created. If the set already exists, the newly generated key is added to it and all existing keys are kept. This allows you to rotate keys: tokens signed with an older key in the set remain verifiable. Exception: when Ory Hydra is configured to use a Hardware Security Module (HSM), generating a key replaces the set, which then contains only the new key. To replace a set and all of its keys instead, use the setJsonWebKeySet operation (PUT /admin/keys/{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.
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.
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.
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).
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.
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. Warning: the key is created or updated under the kid given in the request body. The {kid} path parameter exists for historical reasons only: it is ignored and not validated against the body. 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.
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. This operation replaces the entire JSON Web Key Set: keys that exist in the set but are not part of the request body are deleted. To add a newly generated key to the set while keeping the existing keys, use the createJsonWebKeySet operation (POST /admin/keys/{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.
Functions
@spec create_json_web_key_set( Tesla.Env.client(), String.t(), Ory.Model.CreateJsonWebKeySet.t(), keyword() ) :: {:ok, Ory.Model.ErrorOAuth2.t()} | {:ok, Ory.Model.JsonWebKeySet.t()} | {:error, Tesla.Env.t()}
Create JSON Web Key
This endpoint is capable of generating JSON Web Key Sets for you. There are different strategies available, such as symmetric cryptographic keys (HS256, HS512) and asymmetric cryptographic keys (RS256, ECDSA). If the specified JSON Web Key Set does not exist, it will be created. If the set already exists, the newly generated key is added to it and all existing keys are kept. This allows you to rotate keys: tokens signed with an older key in the set remain verifiable. Exception: when Ory Hydra is configured to use a Hardware Security Module (HSM), generating a key replaces the set, which then contains only the new key. To replace a set and all of its keys instead, use the setJsonWebKeySet operation (PUT /admin/keys/{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
connection(Ory.Connection): Connection to serverset(String.t): The JSON Web Key Set IDcreate_json_web_key_set(CreateJsonWebKeySet):opts(keyword): Optional parameters
Returns
{:ok, Ory.Model.JsonWebKeySet.t}on success{:error, Tesla.Env.t}on failure
@spec delete_json_web_key(Tesla.Env.client(), String.t(), String.t(), keyword()) :: {:ok, nil} | {:ok, Ory.Model.ErrorOAuth2.t()} | {:error, Tesla.Env.t()}
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
connection(Ory.Connection): Connection to serverset(String.t): The JSON Web Key Setkid(String.t): The JSON Web Key ID (kid)opts(keyword): Optional parameters
Returns
{:ok, nil}on success{:error, Tesla.Env.t}on failure
@spec delete_json_web_key_set(Tesla.Env.client(), String.t(), keyword()) :: {:ok, nil} | {:ok, Ory.Model.ErrorOAuth2.t()} | {:error, Tesla.Env.t()}
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
connection(Ory.Connection): Connection to serverset(String.t): The JSON Web Key Setopts(keyword): Optional parameters
Returns
{:ok, nil}on success{:error, Tesla.Env.t}on failure
@spec get_json_web_key(Tesla.Env.client(), String.t(), String.t(), keyword()) :: {:ok, Ory.Model.ErrorOAuth2.t()} | {:ok, Ory.Model.JsonWebKeySet.t()} | {:error, Tesla.Env.t()}
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
connection(Ory.Connection): Connection to serverset(String.t): JSON Web Key Set IDkid(String.t): JSON Web Key IDopts(keyword): Optional parameters
Returns
{:ok, Ory.Model.JsonWebKeySet.t}on success{:error, Tesla.Env.t}on failure
@spec get_json_web_key_set(Tesla.Env.client(), String.t(), keyword()) :: {:ok, Ory.Model.ErrorOAuth2.t()} | {:ok, Ory.Model.JsonWebKeySet.t()} | {:error, Tesla.Env.t()}
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
connection(Ory.Connection): Connection to serverset(String.t): JSON Web Key Set IDopts(keyword): Optional parameters
Returns
{:ok, Ory.Model.JsonWebKeySet.t}on success{:error, Tesla.Env.t}on failure
@spec set_json_web_key(Tesla.Env.client(), String.t(), String.t(), keyword()) :: {:ok, Ory.Model.ErrorOAuth2.t()} | {:ok, Ory.Model.JsonWebKey.t()} | {:error, Tesla.Env.t()}
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. Warning: the key is created or updated under the kid given in the request body. The {kid} path parameter exists for historical reasons only: it is ignored and not validated against the body. 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
connection(Ory.Connection): Connection to serverset(String.t): The JSON Web Key Set IDkid(String.t): JSON Web Key IDopts(keyword): Optional parameters:body(JsonWebKey):
Returns
{:ok, Ory.Model.JsonWebKey.t}on success{:error, Tesla.Env.t}on failure
@spec set_json_web_key_set(Tesla.Env.client(), String.t(), keyword()) :: {:ok, Ory.Model.ErrorOAuth2.t()} | {:ok, Ory.Model.JsonWebKeySet.t()} | {:error, Tesla.Env.t()}
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. This operation replaces the entire JSON Web Key Set: keys that exist in the set but are not part of the request body are deleted. To add a newly generated key to the set while keeping the existing keys, use the createJsonWebKeySet operation (POST /admin/keys/{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
connection(Ory.Connection): Connection to serverset(String.t): The JSON Web Key Set IDopts(keyword): Optional parameters:body(JsonWebKeySet):
Returns
{:ok, Ory.Model.JsonWebKeySet.t}on success{:error, Tesla.Env.t}on failure