Package 

Class SignatureVerifier


  • 
    abstract class SignatureVerifier
    
                        

    Abstract class meant to verify tokens signed with HS256 and RS256 signatures.

    • 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").
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SignatureVerifier

        SignatureVerifier(List<String> supportedAlgorithms)
    • 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