Class RawJwt


  • @Immutable
    public final class RawJwt
    extends java.lang.Object
    An unencoded and unsigned JSON Web Token (JWT).

    It contains all payload claims and a subset of the headers. It does not contain any headers that depend on the key, such as "alg" or "kid", because these headers are chosen when the token is signed and encoded, and should not be chosen by the user. This ensures that the key can be changed without any changes to the user code.

    • Method Detail

      • newBuilder

        public static RawJwt.Builder newBuilder()
        Returns a new RawJwt.Builder.
      • getJsonPayload

        public java.lang.String getJsonPayload()
      • hasBooleanClaim

        public boolean hasBooleanClaim​(java.lang.String name)
      • hasNumberClaim

        public boolean hasNumberClaim​(java.lang.String name)
      • hasStringClaim

        public boolean hasStringClaim​(java.lang.String name)
      • isNullClaim

        public boolean isNullClaim​(java.lang.String name)
      • hasJsonObjectClaim

        public boolean hasJsonObjectClaim​(java.lang.String name)
      • hasJsonArrayClaim

        public boolean hasJsonArrayClaim​(java.lang.String name)
      • hasTypeHeader

        public boolean hasTypeHeader()
      • hasIssuer

        public boolean hasIssuer()
      • hasSubject

        public boolean hasSubject()
      • hasJwtId

        public boolean hasJwtId()
      • hasAudiences

        public boolean hasAudiences()
      • hasExpiration

        public boolean hasExpiration()
      • hasNotBefore

        public boolean hasNotBefore()
      • hasIssuedAt

        public boolean hasIssuedAt()
      • customClaimNames

        public java.util.Set<java.lang.String> customClaimNames()
        Returns all custom claim names.
      • toString

        public java.lang.String toString()
        Returns a brief description of a RawJwt object. The exact details of the representation are unspecified and subject to change.
        Overrides:
        toString in class java.lang.Object