Interface JsonJWS<A,B extends JsonJWS.Signature<A>>

Type Parameters:
A - the payload type
B - the signature type
All Superinterfaces:
JsonJOSEObject<A>

public interface JsonJWS<A,B extends JsonJWS.Signature<A>> extends JsonJOSEObject<A>

A JSON Web Signature object supporting JWS JSON representation as defined by RFC7515 Section 7.2.

Unlike JWS, a JSON JWS object can be used to represent multiple JSON Web Signature objects providing different signature for a given payload. This can be used to create a JWS with multiple signature that can be validated by different recipients.

As per RFC7515, the JSON representation is neither optimized for compactness nor URL safe.

Since:
1.5
Author:
Jeremy Kuhn
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    Built signature resulting from the build of a JSON JWS and exposing the signature JWS directly.
    static interface 
    Read signature resulting from the read of a JSON JWS and exposing a single JWS publisher used to validate the signature JWS.
    static interface 
    Base JSON JWS Signature exposing signature protected and unprotected JWS JOSE headers and the signature.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the payload.
    Returns the list of signatures.

    Methods inherited from interface io.inverno.mod.security.jose.JsonJOSEObject

    toJson
  • Method Details

    • getPayload

      A getPayload()

      Returns the payload.

      Returns:
      the payload
    • getSignatures

      List<B> getSignatures()

      Returns the list of signatures.

      When considering a built JSON JWS, signatures must be of type JsonJWS.BuiltSignature which directly exposes the built JWS objects corresponding to each signature.

      When considering a read JSON JWS, signatures must be of type JsonJWS.ReadSignature which exposes JWS objects per recipient as single publisher used to validate the corresponding JWS.

      Returns:
      a list of signatures