Class ClientJwksParser
java.lang.Object
com.irurueta.authserver.authorization.api.web.clients.ClientJwksParser
Parses and validates the public JWK set a client registers for
private_key_jwt and self-signed mutual TLS
authentication, and converts it between the JSON object of the contract and the JSON text the domain keeps.-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
ClientJwksParser
public ClientJwksParser()
-
-
Method Details
-
toJson
Validates a JWK set sent by an administrator and returns its JSON text. Only public keys are accepted: a key with private material (including a symmetric key) is refused.- Parameters:
jwks- the JWK set as a JSON object, ornull.- Returns:
- the JWK set as JSON text, or
nullwhen none was given. - Throws:
InvalidClientJwksException- if the object is not a JWK set, has no keys or has a private key.
-
toObject
Converts the JSON text of a registered JWK set to the JSON object of the contract.- Parameters:
json- the JWK set as JSON text, ornull.- Returns:
- the JWK set as an object, or
nullwhen there is none. - Throws:
InvalidClientJwksException- if the stored text is not a JWK set.
-