public interface JWSVerifier extends JWSAlgorithmProvider
Callers can query the verifier to determine its algorithm capabilities as well as the JWS algorithms and header parameters that are accepted for processing.
Modifier and Type | Method and Description |
---|---|
JWSHeaderFilter |
getJWSHeaderFilter()
Gets the JWS header filter associated with the verifier.
|
boolean |
verify(ReadOnlyJWSHeader header,
byte[] signedContent,
Base64URL signature)
Verifies the specified
signature of a
JWS object . |
supportedAlgorithms
JWSHeaderFilter getJWSHeaderFilter()
supported JWS algorithms
and
header parameters that the verifier is configured to accept.
Attempting to verify
a JWS object signature with an
algorithm or header parameter that is not accepted must result in a
JOSEException
.
boolean verify(ReadOnlyJWSHeader header, byte[] signedContent, Base64URL signature) throws JOSEException
signature
of a
JWS object
.header
- The JSON Web Signature (JWS) header. Must
specify an accepted JWS algorithm, must contain
only accepted header parameters, and must not be
null
.signedContent
- The signed content. Must not be null
.signature
- The signature part of the JWS object. Must not
be null
.true
if the signature was successfully verified, else
false
.JOSEException
- If the JWS algorithm is not accepted, if a header
parameter is not accepted, or if signature
verification failed for some other reason.Copyright © 2013 NimbusDS. All Rights Reserved.