Class JWSValidator

java.lang.Object
org.webpki.jose.jws.JWSValidator
Direct Known Subclasses:
JWSAsymSignatureValidator, JWSHmacValidator

public abstract class JWSValidator extends Object
JWS validator base class
  • Method Details

    • setProvider

      public JWSValidator setProvider(String provider)
      Set cryptographic provider.
      Parameters:
      provider - Name of provider like "BC"
      Returns:
      this
    • validate

      public JWSDecoder validate(JWSDecoder jwsDecoder, byte[] detachedPayload)
      Validate JWS object in "detached" mode. Note that the detached mode follows the specification described in https://tools.ietf.org/html/rfc7515#appendix-F.
      Parameters:
      jwsDecoder - Decoded JWS data
      detachedPayload - Detached payload
      Returns:
      JwsDecoder
    • validate

      public JWSDecoder validate(JWSDecoder jwsDecoder)
      Validate JWS or JWS/CT object. Note that for JWS the "standard" mode is assumed while JWS/CT implicitly builds on the "detached" mode.
      Parameters:
      jwsDecoder - Decoded JWS data
      Returns:
      JwsDecoder