Interface JwsValidator


public interface JwsValidator
The JwsValidator provides a simple API to validate JWS formatted token as defined in http://tools.ietf.org/html/draft-ietf-oauth-json-web-token-16 and http://tools.ietf.org/html/draft-ietf-jose-json-web-signature-21
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Validates the given JWS token using a system key compatible with the algorithm specified in the JWS (if available)
    boolean
    validate(String jws, Key verifyingKey)
    Validates the given JWS token using the given key
  • Method Details

    • validate

      boolean validate(String jws, Key verifyingKey)
      Validates the given JWS token using the given key
      Parameters:
      jws - The JWS token to validate
      key - The key used to verify the JWS. This must be @link javax.crypto.spec.SecretKeySpec in case of symmetric algorithm and
    • validate

      boolean validate(String jws)
      Validates the given JWS token using a system key compatible with the algorithm specified in the JWS (if available)
      Parameters:
      jws - The JWS token to validate
      Returns:
      true if the JWS is valid as defined in http://tools.ietf.org/html/draft-ietf-jose-json-web-signature-21