Package com.nimbusds.jose
Class JWSObjectJSON.Signature
java.lang.Object
com.nimbusds.jose.JWSObjectJSON.Signature
- Enclosing class:
- JWSObjectJSON
Individual signature in a JWS secured object serialisable to JSON.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the JWS protected header.Returns the signature.Returns the unprotected header.booleanReturnstrueif the signature was successfully verified with a previous call toverify(com.nimbusds.jose.JWSVerifier).Returns the compact JWS object representation of this individual signature.booleanverify(JWSVerifier verifier) Checks the signature with the specified verifier.
-
Method Details
-
getHeader
Returns the JWS protected header.- Returns:
- The JWS protected header,
nullif none.
-
getUnprotectedHeader
Returns the unprotected header.- Returns:
- The unprotected header,
nullif none.
-
getSignature
Returns the signature.- Returns:
- The signature.
-
toJWSObject
Returns the compact JWS object representation of this individual signature.- Returns:
- The JWS object serialisable to compact encoding.
-
isVerified
Returnstrueif the signature was successfully verified with a previous call toverify(com.nimbusds.jose.JWSVerifier).- Returns:
trueif the signature was successfully verified,falseif the signature is invalid orverify(com.nimbusds.jose.JWSVerifier)was never called.
-
verify
Checks the signature with the specified verifier.- Parameters:
verifier- The JWS verifier. Must not benull.- Returns:
trueif the signature was successfully verified, elsefalse.- Throws:
JOSEException- If the signature verification failed.
-