Interface Verifier

All Known Implementing Classes:
ECVerifier, HMACVerifier, RSAPSSVerifier, RSAVerifier

public interface Verifier
Author:
Daniel DeGroff
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    canVerify(Algorithm algorithm)
     
    void
    verify(Algorithm algorithm, byte[] message, byte[] signature)
    Verify the signature of the encoded JWT payload.
  • Method Details

    • canVerify

      boolean canVerify(Algorithm algorithm)
      Parameters:
      algorithm - The algorithm required to verify the signature on this JWT.
      Returns:
      True if this Verifier is able to verify a signature using the specified algorithm.
    • verify

      void verify(Algorithm algorithm, byte[] message, byte[] signature)
      Verify the signature of the encoded JWT payload.
      Parameters:
      algorithm - The algorithm used to verify the JWT signature.
      message - The JWT message. The header and claims, the first two segments of the dot separated JWT.
      signature - The signature to verify.
      Throws:
      InvalidJWTSignatureException - If the signature is not valid.