Package io.fusionauth.jwt.hmac
Class HMACVerifier
java.lang.Object
io.fusionauth.jwt.hmac.HMACVerifier
- All Implemented Interfaces:
Verifier
This class is used to verify a JWT signed with an HMAC algorithm.
- Author:
- Daniel DeGroff
-
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic HMACVerifiernewVerifier(byte[] bytes) Return a new instance of the HMAC Verifier with the provided secret.static HMACVerifiernewVerifier(byte[] bytes, CryptoProvider cryptoProvider) Return a new instance of the HMAC Verifier with the provided secret.static HMACVerifiernewVerifier(String secret) Return a new instance of the HMAC Verifier with the provided secret.static HMACVerifiernewVerifier(String secret, CryptoProvider cryptoProvider) Return a new instance of the HMAC Verifier with the provided secret.static HMACVerifiernewVerifier(Path path) Return a new instance of the HMAC Verifier with the provided secret.static HMACVerifiernewVerifier(Path path, CryptoProvider cryptoProvider) Return a new instance of the HMAC Verifier with the provided secret.voidVerify the signature of the encoded JWT payload.
-
Method Details
-
newVerifier
Return a new instance of the HMAC Verifier with the provided secret.- Parameters:
secret- The secret.- Returns:
- a new instance of the HMAC verifier.
-
newVerifier
Return a new instance of the HMAC Verifier with the provided secret.- Parameters:
path- The path to the secret.- Returns:
- a new instance of the HMAC verifier.
-
newVerifier
Return a new instance of the HMAC Verifier with the provided secret.- Parameters:
bytes- The bytes of the secret.- Returns:
- a new instance of the HMAC verifier.
-
newVerifier
Return a new instance of the HMAC Verifier with the provided secret.- Parameters:
secret- The secret.cryptoProvider- The crypto provider used to get the MAC digest algorithm.- Returns:
- a new instance of the HMAC verifier.
-
newVerifier
Return a new instance of the HMAC Verifier with the provided secret.- Parameters:
path- The path to the secret.cryptoProvider- The crypto provider used to get the MAC digest algorithm.- Returns:
- a new instance of the HMAC verifier.
-
newVerifier
Return a new instance of the HMAC Verifier with the provided secret.- Parameters:
bytes- The bytes of the secret.cryptoProvider- The crypto provider used to get the MAC digest algorithm.- Returns:
- a new instance of the HMAC verifier.
-
canVerify
-
verify
Description copied from interface:VerifierVerify the signature of the encoded JWT payload.
-