-
abstract class SignatureVerifier
Abstract class meant to verify tokens signed with HS256 and RS256 signatures.
-
-
Constructor Summary
Constructors Constructor Description SignatureVerifier(List<String> supportedAlgorithms)
-
Method Summary
Modifier and Type Method Description void
verify(Jwt token)
Verifies that the given token's signature is valid, deeming the payload inside it authentic static void
forAsymmetricAlgorithm(String keyId, AuthenticationAPIClient apiClient, Callback<SignatureVerifier, TokenValidationException> callback)
Creates a new SignatureVerifier for Asymmetric algorithm ("RS256"). -
-
Method Detail
-
verify
void verify(Jwt token)
Verifies that the given token's signature is valid, deeming the payload inside it authentic
- Parameters:
token
- the ID token to have its signature validated
-
forAsymmetricAlgorithm
static void forAsymmetricAlgorithm(String keyId, AuthenticationAPIClient apiClient, Callback<SignatureVerifier, TokenValidationException> callback)
Creates a new SignatureVerifier for Asymmetric algorithm ("RS256"). Signature check will actually happen.
- Parameters:
keyId
- the id of the key used to sign this token.apiClient
- the Authentication API client instance.callback
- where to receive the results
-
-
-
-