Enum Class JwsSerialization

java.lang.Object
java.lang.Enum<JwsSerialization>
co.ankatech.ankasecure.sdk.model.JwsSerialization
All Implemented Interfaces:
Serializable, Comparable<JwsSerialization>, Constable

public enum JwsSerialization extends Enum<JwsSerialization>
JWS serialization representation requested for an attached signing operation (PRD §60).

This axis is orthogonal to the backend-authoritative qualified-timestamp policy: selecting a serialization never adds or drops a timestamp. It only chooses how the produced JWS is represented on the wire.

  • COMPACT — RFC 7515 §7.1 Compact Serialization (three dot-separated Base64URL segments). Cannot carry a JAdES qualified timestamp.
  • JSON — RFC 7515 §7.2 JWS JSON Serialization (a JSON object able to carry a JAdES B-T qualified timestamp in its unprotected header).

Passing a serialization to the ergonomic overloads is optional. When the discrete-parameter methods (without a JwsSerialization argument) are used, no serialization is sent and the server chooses the standards-correct representation: compact when no timestamp is mandated, JWS-JSON when the deployment/tenant policy requires an RFC 3161 signature timestamp.

Requesting COMPACT while the backend-authoritative policy mandates a timestamp is the single incompatible combination and is rejected by the server with HTTP 400.

Since:
3.0.0
Author:
ANKATech Solutions Inc.
  • Enum Constant Details

    • COMPACT

      public static final JwsSerialization COMPACT
      RFC 7515 §7.1 Compact Serialization (three dot-separated segments).
    • JSON

      public static final JwsSerialization JSON
      RFC 7515 §7.2 JWS JSON Serialization (able to carry a JAdES timestamp).
  • Method Details

    • values

      public static JwsSerialization[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static JwsSerialization valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null