java.lang.Object
net.pincette.jwt.Verifier
Verifies JTWs using the Auth0 library. It selects the algorithm based on the given public key.
- Author:
- Werner Donné
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionverify(DecodedJWT jwt) Verifies the given JWT.Verifies the given JWT.
-
Constructor Details
-
Verifier
Creates a JWT verifier with a public key in PEM format. Only RSA and ECDSA are supported.- Parameters:
publicKey- the given public key of type RSA or ECDSA.
-
Verifier
Creates a JWT verifier with a public key. Only RSA and ECDSA are supported.- Parameters:
publicKey- the given public key of type RSA or ECDSA.
-
-
Method Details
-
verify
Verifies the given JWT.- Parameters:
jwt- the given JWT.- Returns:
- An optional value that will be empty when the JWT can't be verified.
-
verify
Verifies the given JWT.- Parameters:
jwt- the given JWT.- Returns:
- An optional value that will be empty when the JWT can't be verified.
-