Package io.fusionauth.jwt.rsa
Class RSAVerifier
java.lang.Object
io.fusionauth.jwt.rsa.RSAVerifier
- All Implemented Interfaces:
Verifier
This class is used to verify a JWT with an RSA signature using an RSA Public Key.
- Author:
- Daniel DeGroff
-
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic RSAVerifiernewVerifier(byte[] bytes) Return a new instance of the RSA Verifier with the provided public key.static RSAVerifiernewVerifier(String publicKey) Return a new instance of the RSA Verifier with the provided public key.static RSAVerifiernewVerifier(String publicKey, CryptoProvider cryptoProvider) Return a new instance of the RSA Verifier with the provided public key.static RSAVerifiernewVerifier(Path path) Return a new instance of the RSA Verifier with the provided public key.static RSAVerifiernewVerifier(Path path, CryptoProvider cryptoProvider) Return a new instance of the RSA Verifier with the provided public key.static RSAVerifiernewVerifier(PublicKey publicKey) Return a new instance of the RSA Verifier with the provided public key.static RSAVerifiernewVerifier(PublicKey publicKey, CryptoProvider cryptoProvider) Return a new instance of the RSA Verifier with the provided public key.voidVerify the signature of the encoded JWT payload.
-
Method Details
-
newVerifier
Return a new instance of the RSA Verifier with the provided public key.- Parameters:
publicKey- The RSA public key object.- Returns:
- a new instance of the RSA verifier.
-
newVerifier
Return a new instance of the RSA Verifier with the provided public key.- Parameters:
publicKey- The RSA public key object.cryptoProvider- The crypto provider used to get the RSA signature Algorithm.- Returns:
- a new instance of the RSA verifier.
-
newVerifier
Return a new instance of the RSA Verifier with the provided public key.- Parameters:
publicKey- The RSA public key PEM.- Returns:
- a new instance of the RSA verifier.
-
newVerifier
Return a new instance of the RSA Verifier with the provided public key.- Parameters:
publicKey- The RSA public key PEM.cryptoProvider- The crypto provider used to get the RSA signature Algorithm.- Returns:
- a new instance of the RSA verifier.
-
newVerifier
Return a new instance of the RSA Verifier with the provided public key.- Parameters:
path- The path to the RSA public key PEM.- Returns:
- a new instance of the RSA verifier.
-
newVerifier
Return a new instance of the RSA Verifier with the provided public key.- Parameters:
path- The path to the RSA public key PEM.cryptoProvider- The crypto provider used to get the RSA signature Algorithm.- Returns:
- a new instance of the RSA verifier.
-
newVerifier
Return a new instance of the RSA Verifier with the provided public key.- Parameters:
bytes- The bytes of the RSA public key PEM.- Returns:
- a new instance of the RSA verifier.
-
canVerify
-
verify
Description copied from interface:VerifierVerify the signature of the encoded JWT payload.
-