Class NoneAlgorithm

java.lang.Object
com.auth0.jwt.algorithms.Algorithm
com.auth0.jwt.algorithms.NoneAlgorithm

class NoneAlgorithm extends Algorithm
  • Constructor Details

    • NoneAlgorithm

      NoneAlgorithm()
  • Method Details

    • verify

      public void verify(DecodedJWT jwt) throws SignatureVerificationException
      Description copied from class: Algorithm
      Verify the given token using this Algorithm instance.
      Specified by:
      verify in class Algorithm
      Parameters:
      jwt - the already decoded JWT that it's going to be verified.
      Throws:
      SignatureVerificationException - if the Token's Signature is invalid, meaning that it doesn't match the signatureBytes, or if the Key is invalid.
    • sign

      public byte[] sign(byte[] headerBytes, byte[] payloadBytes) throws SignatureGenerationException
      Description copied from class: Algorithm
      Sign the given content using this Algorithm instance.
      Overrides:
      sign in class Algorithm
      Parameters:
      headerBytes - an array of bytes representing the base64 encoded header content to be verified against the signature.
      payloadBytes - an array of bytes representing the base64 encoded payload content to be verified against the signature.
      Returns:
      the signature in a base64 encoded array of bytes
      Throws:
      SignatureGenerationException - if the Key is invalid.
    • sign

      @Deprecated public byte[] sign(byte[] contentBytes) throws SignatureGenerationException
      Deprecated.
      Description copied from class: Algorithm
      Sign the given content using this Algorithm instance.
      Specified by:
      sign in class Algorithm
      Parameters:
      contentBytes - an array of bytes representing the base64 encoded content to be verified against the signature.
      Returns:
      the signature in a base64 encoded array of bytes
      Throws:
      SignatureGenerationException - if the Key is invalid.