org.keycloak.representations

## Class JsonWebToken

- java.lang.Object
- - org.keycloak.representations.JsonWebToken

- All Implemented Interfaces:
    Serializable
  Direct Known Subclasses:
    IDToken

      public class JsonWebToken
      extends Object
      implements Serializable

  Version:
    $Revision: 1 $
  Author:
    Bill Burke
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected String` | `audience`
    `protected int` | `expiration`
    `protected String` | `id`
    `protected int` | `issuedAt`
    `String` | `issuedFor`
    `protected String` | `issuer`
    `protected int` | `notBefore`
    `protected String` | `subject`
    `protected String` | `type`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `JsonWebToken()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `JsonWebToken` | `audience(String audience)`
    `JsonWebToken` | `expiration(int expiration)`
    `String` | `getAudience()`
    `int` | `getExpiration()`
    `String` | `getId()`
    `int` | `getIssuedAt()`
    `String` | `getIssuedFor()` OAuth client the token was issued for.
    `String` | `getIssuer()`
    `int` | `getNotBefore()`
    `String` | `getSubject()`
    `String` | `getType()`
    `JsonWebToken` | `id(String id)`
    `boolean` | `isActive()` Tests that the token is not expired and is not-before.
    `boolean` | `isExpired()`
    `boolean` | `isNotBefore()`
    `JsonWebToken` | `issuedAt(int issuedAt)`
    `JsonWebToken` | `issuedFor(String issuedFor)`
    `JsonWebToken` | `issuedNow()` Set issuedAt to the current time
    `JsonWebToken` | `issuer(String issuer)`
    `JsonWebToken` | `notBefore(int notBefore)`
    `void` | `setSubject(String subject)`
    `JsonWebToken` | `subject(String subject)`
    `JsonWebToken` | `type(String type)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### id

          protected String id

    - #### expiration

          protected int expiration

    - #### notBefore

          protected int notBefore

    - #### issuedAt

          protected int issuedAt

    - #### issuer

          protected String issuer

    - #### audience

          protected String audience

    - #### subject

          protected String subject

    - #### type

          protected String type

    - #### issuedFor

          public String issuedFor

  - ### Constructor Detail

    - #### JsonWebToken

          public JsonWebToken()

  - ### Method Detail

    - #### getId

          public String getId()

    - #### id

          public JsonWebToken id(String id)

    - #### getExpiration

          public int getExpiration()

    - #### expiration

          public JsonWebToken expiration(int expiration)

    - #### isExpired

          public boolean isExpired()

    - #### getNotBefore

          public int getNotBefore()

    - #### notBefore

          public JsonWebToken notBefore(int notBefore)

    - #### isNotBefore

          public boolean isNotBefore()

    - #### isActive

          public boolean isActive()

      Tests that the token is not expired and is not-before.
      Returns:

    - #### getIssuedAt

          public int getIssuedAt()

    - #### issuedNow

          public JsonWebToken issuedNow()

      Set issuedAt to the current time

    - #### issuedAt

          public JsonWebToken issuedAt(int issuedAt)

    - #### getIssuer

          public String getIssuer()

    - #### issuer

          public JsonWebToken issuer(String issuer)

    - #### getAudience

          public String getAudience()

    - #### audience

          public JsonWebToken audience(String audience)

    - #### getSubject

          public String getSubject()

    - #### subject

          public JsonWebToken subject(String subject)

    - #### setSubject

          public void setSubject(String subject)

    - #### getType

          public String getType()

    - #### type

          public JsonWebToken type(String type)

    - #### getIssuedFor

          public String getIssuedFor()

      OAuth client the token was issued for.
      Returns:

    - #### issuedFor

          public JsonWebToken issuedFor(String issuedFor)

Copyright © 2015. All rights reserved.