Class JoseHttpVerifier
java.lang.Object
com.authlete.hms.impl.JoseHttpVerifier
- All Implemented Interfaces:
HttpVerifier
An
HttpVerifier implementation for JWS algorithms.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionJoseHttpVerifier(JWK key) A constructor with a key for verification.JoseHttpVerifier(JWK key, JWSAlgorithm alg) A constructor with a key and algorithm for verification. -
Method Summary
-
Constructor Details
-
JoseHttpVerifier
A constructor with a key for verification.An algorithm needs to be specified by the
algparameter in the JWK.- Parameters:
key- A verification key.- Throws:
IllegalArgumentException- The key is null, or it does not contain thealgparameter.
-
JoseHttpVerifier
A constructor with a key and algorithm for verification.An algorithm needs to be specified by either the
algargument passed to this method or thealgparameter in the JWK. When both means are used, the specified algorithms must be identical.- Parameters:
key- A verification key.alg- An algorithm for verification.- Throws:
IllegalArgumentException- The key is null, or thealgparameter of the key does not match the algorithm specified by thealgargument. Or, the key does not contain thealgparameter and thealgargument is null.
-
-
Method Details
-
verify
Description copied from interface:HttpVerifierVerify the signature.- Specified by:
verifyin interfaceHttpVerifier- Parameters:
signatureBase- The signature base used to create the signature.signature- The signature to be verified.- Returns:
- True when the signature is valid.
- Throws:
SignatureException- An error occurred during the verification process, or the signature is invalid.
-
getKey
-
getAlg
-