public class JsonWebToken extends Object implements Serializable
| Modifier and Type | Field and Description |
|---|---|
protected String[] |
audience |
protected Long |
exp |
protected Long |
iat |
protected String |
id |
String |
issuedFor |
protected String |
issuer |
protected Long |
nbf |
protected Map<String,Object> |
otherClaims |
protected String |
subject |
protected String |
type |
| Constructor and Description |
|---|
JsonWebToken() |
| Modifier and Type | Method and Description |
|---|---|
JsonWebToken |
addAudience(String audience) |
JsonWebToken |
audience(String... audience) |
JsonWebToken |
exp(Long exp) |
String[] |
getAudience() |
Long |
getExp() |
Long |
getIat() |
String |
getId() |
String |
getIssuedFor()
OAuth client the token was issued for.
|
String |
getIssuer() |
Long |
getNbf() |
Map<String,Object> |
getOtherClaims()
This is a map of any other claims and data that might be in the IDToken.
|
String |
getSubject() |
String |
getType() |
boolean |
hasAudience(String audience) |
JsonWebToken |
iat(Long iat) |
JsonWebToken |
id(String id) |
boolean |
isActive()
Tests that the token is not expired and is not-before.
|
boolean |
isActive(int allowedTimeSkew) |
boolean |
isExpired() |
boolean |
isNotBefore(int allowedTimeSkew) |
JsonWebToken |
issuedFor(String issuedFor) |
JsonWebToken |
issuedNow()
Set issuedAt to the current time
|
JsonWebToken |
issuer(String issuer) |
JsonWebToken |
nbf(Long nbf) |
void |
setOtherClaims(String name,
Object value) |
void |
setSubject(String subject) |
JsonWebToken |
subject(String subject) |
JsonWebToken |
type(String type) |
protected String id
protected Long exp
protected Long nbf
protected Long iat
protected String issuer
protected String[] audience
protected String subject
protected String type
public String issuedFor
public String getId()
public JsonWebToken id(String id)
public Long getExp()
public JsonWebToken exp(Long exp)
public boolean isExpired()
public Long getNbf()
public JsonWebToken nbf(Long nbf)
public boolean isNotBefore(int allowedTimeSkew)
public boolean isActive()
public boolean isActive(int allowedTimeSkew)
public Long getIat()
public JsonWebToken issuedNow()
public JsonWebToken iat(Long iat)
public String getIssuer()
public JsonWebToken issuer(String issuer)
public String[] getAudience()
public boolean hasAudience(String audience)
public JsonWebToken audience(String... audience)
public JsonWebToken addAudience(String audience)
public String getSubject()
public JsonWebToken subject(String subject)
public void setSubject(String subject)
public String getType()
public JsonWebToken type(String type)
public String getIssuedFor()
public JsonWebToken issuedFor(String issuedFor)
public Map<String,Object> getOtherClaims()
Copyright © 2022. All Rights Reserved.