Package swim.security

Class JsonWebToken

java.lang.Object
swim.security.JsonWebToken
All Implemented Interfaces:
swim.codec.Debug
Direct Known Subclasses:
OpenIdToken

public class JsonWebToken extends Object implements swim.codec.Debug
  • Field Details

    • value

      protected final swim.structure.Value value
  • Constructor Details

    • JsonWebToken

      public JsonWebToken(swim.structure.Value value)
    • JsonWebToken

      public JsonWebToken()
  • Method Details

    • get

      public swim.structure.Value get(String name)
    • issuer

      public String issuer()
    • issuer

      public JsonWebToken issuer(String issuer)
    • subject

      public String subject()
    • subject

      public JsonWebToken subject(String subject)
    • audience

      public String audience()
    • audience

      public JsonWebToken audience(String audience)
    • audiences

      public swim.collections.FingerTrieSeq<String> audiences()
    • audiences

      public JsonWebToken audiences(String... audiences)
    • expiration

      public long expiration()
    • expiration

      public JsonWebToken expiration(long expiration)
    • notBefore

      public long notBefore()
    • notBefore

      public JsonWebToken notBefore(long notBefore)
    • issuedAt

      public long issuedAt()
    • issuedAt

      public JsonWebToken issuedAt(long issuedAt)
    • jwtId

      public String jwtId()
    • jwtId

      public JsonWebToken jwtId(String jwtId)
    • joseHeader

      public swim.structure.Record joseHeader()
    • mac

      public JsonWebSignature mac(Key symmetricKey)
    • sign

      public JsonWebSignature sign(PrivateKey privateKey)
    • toValue

      public final swim.structure.Value toValue()
    • copy

      protected JsonWebToken copy(swim.structure.Value value)
    • canEqual

      protected boolean canEqual(Object other)
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • debug

      public <T> swim.codec.Output<T> debug(swim.codec.Output<T> output)
      Specified by:
      debug in interface swim.codec.Debug
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • from

      public static JsonWebToken from(swim.structure.Value value)
    • parse

      public static JsonWebToken parse(String json)