Class SignatureVerifier

java.lang.Object
com.auth0.utils.tokens.SignatureVerifier

public abstract class SignatureVerifier extends Object
Represents the verification for an ID Token's signature used when validating an ID token.

This class is thread-safe.

See Also:
  • JWTVerifier
  • Method Details

    • forHS256

      public static SignatureVerifier forHS256(String secret)
      Get a SignatureVerifier for use when validating an ID token signed using the HS256 signing algorithm.
      Parameters:
      secret - the client's secret to use when validating the token's signature.
      Returns:
      a SignatureVerifier for use with tokens signed using the HS256 signing algorithm.
    • forRS256

      public static SignatureVerifier forRS256(PublicKeyProvider publicKeyProvider)
      Get a SignatureVerifier for use when validating an ID token signed using the RS256 signing algorithm. Callers should provide an implementation of the PublicKeyProvider to provide the public key used to verify the ID token's signature.
      Parameters:
      publicKeyProvider - an implementation of PublicKeyProvider to get the public key.
      Returns:
      a SignatureVerifier for use with tokens signed using the RS256 signing algorithm.
      See Also: