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 JsonWebTokenaudience(String audience)JsonWebTokenexpiration(long expiration)StringgetAudience()longgetExpiration()StringgetId()longgetIssuedAt()StringgetIssuer()longgetNotBefore()StringgetPrincipal()StringgetType()JsonWebTokenid(String id)booleanisActive()Tests that the token is not expired and is not-before.booleanisExpired()booleanisNotBefore()JsonWebTokenissuedAt(long issuedAt)JsonWebTokenissuedNow()Set issuedAt to the current time.JsonWebTokenissuer(String issuer)JsonWebTokennotBefore(long notBefore)JsonWebTokenprincipal(String principal)JsonWebTokentype(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)
-
-