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

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean validate​(java.lang.String jws)
      Validates the given JWS token using a system key compatible with the algorithm specified in the JWS (if available)
      boolean validate​(java.lang.String jws, java.security.Key verifyingKey)
      Validates the given JWS token using the given key
    • Method Detail

      • validate

        boolean validate​(java.lang.String jws,
                         java.security.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​(java.lang.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