org.jboss.resteasy.jwt

## Class JsonWebToken

- java.lang.Object
- - org.jboss.resteasy.jwt.JsonWebToken

- All Implemented Interfaces:
    Serializable
  Direct Known Subclasses:
    SkeletonKeyToken

      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 long` | `expiration`
    `protected String` | `id`
    `protected long` | `issuedAt`
    `protected String` | `issuer`
    `protected long` | `notBefore`
    `protected String` | `principal`
    `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(long expiration)`
    `String` | `getAudience()`
    `long` | `getExpiration()`
    `String` | `getId()`
    `long` | `getIssuedAt()`
    `String` | `getIssuer()`
    `long` | `getNotBefore()`
    `String` | `getPrincipal()`
    `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(long issuedAt)`
    `JsonWebToken` | `issuedNow()` Set issuedAt to the current time
    `JsonWebToken` | `issuer(String issuer)`
    `JsonWebToken` | `notBefore(long notBefore)`
    `JsonWebToken` | `principal(String principal)`
    `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 long expiration

    - #### notBefore

          protected long notBefore

    - #### issuedAt

          protected long issuedAt

    - #### issuer

          protected String issuer

    - #### audience

          protected String audience

    - #### principal

          protected String principal

    - #### type

          protected String type

  - ### Constructor Detail

    - #### JsonWebToken

          public JsonWebToken()

  - ### Method Detail

    - #### getId

          public String getId()

    - #### id

          public JsonWebToken id(String id)

    - #### getExpiration

          public long getExpiration()

    - #### expiration

          public JsonWebToken expiration(long expiration)

    - #### isExpired

          public boolean isExpired()

    - #### getNotBefore

          public long getNotBefore()

    - #### notBefore

          public JsonWebToken notBefore(long notBefore)

    - #### isNotBefore

          public boolean isNotBefore()

    - #### isActive

          public boolean isActive()

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

    - #### getIssuedAt

          public long getIssuedAt()

    - #### issuedNow

          public JsonWebToken issuedNow()

      Set issuedAt to the current time

    - #### issuedAt

          public JsonWebToken issuedAt(long issuedAt)

    - #### getIssuer

          public String getIssuer()

    - #### issuer

          public JsonWebToken issuer(String issuer)

    - #### getAudience

          public String getAudience()

    - #### audience

          public JsonWebToken audience(String audience)

    - #### getPrincipal

          public String getPrincipal()

    - #### principal

          public JsonWebToken principal(String principal)

    - #### getType

          public String getType()

    - #### type

          public JsonWebToken type(String type)

Copyright © 2014. All Rights Reserved.