Package org.jboss.resteasy.jwt
Class JsonWebToken
- java.lang.Object
-
- org.jboss.resteasy.jwt.JsonWebToken
-
- All Implemented Interfaces:
Serializable
public class JsonWebToken extends Object implements Serializable
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description JsonWebToken()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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)
-
-
-
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:
- true if the token is not expired and is not-before
-
getIssuedAt
public long getIssuedAt()
-
issuedNow
public JsonWebToken issuedNow()
Set issuedAt to the current time.- Returns:
JsonWebToken
-
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)
-
-