Class OctJWK


public class OctJWK extends JWK
Creates an Octet JWK.
  • Constructor Details

    • OctJWK

      public OctJWK(KeyUse use, String alg, String kid, String key, String x5u, String x5t, List<String> x5c)
      Constructs a OctJWK.
      Parameters:
      use - the JWK use
      alg - the JWK algorithm
      kid - the JWK key id
      key - the symmetric key
      x5u - the x509 url for the key
      x5t - the x509 thumbnail for the key
      x5c - the x509 chain as a list of Base64 encoded strings
  • Method Details

    • getKey

      public String getKey()
      Gets the symmetric key.
      Returns:
      the symmetric key that is Base64url encoded
    • parse

      public static OctJWK parse(String json)
      Parses a OctJWK object from a string json object.
      Parameters:
      json - string json object
      Returns:
      a OctJWK
    • parse

      public static OctJWK parse(JsonValue json)
      Parses a OctJWK object from a jsonValue object.
      Parameters:
      json - an JsonValue object
      Returns:
      a OctJWK
    • toJsonString

      public String toJsonString()
      Prints the JWK as a json string.
      Overrides:
      toJsonString in class JWK
      Returns:
      json string