Package io.jans.as.model.jwt
Class JwtClaimSet
- java.lang.Object
-
- io.jans.as.model.jwt.JwtClaimSet
-
- Direct Known Subclasses:
JwtClaims
,JwtHeader
,JwtSubClaimObject
public abstract class JwtClaimSet extends java.lang.Object
- Version:
- January 3, 2018
- Author:
- Javier Rojas Blum
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
JwtClaimSet()
protected
JwtClaimSet(java.lang.String base64JsonObject)
protected
JwtClaimSet(org.json.JSONObject jsonObject)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
getClaim(java.lang.String key)
java.lang.Character
getClaimAsCharacter(java.lang.String key)
java.util.Date
getClaimAsDate(java.lang.String key)
java.lang.Integer
getClaimAsInteger(java.lang.String key)
org.json.JSONObject
getClaimAsJSON(java.lang.String key)
java.lang.Long
getClaimAsLong(java.lang.String key)
java.lang.String
getClaimAsString(java.lang.String key)
java.util.List<java.lang.String>
getClaimAsStringList(java.lang.String key)
boolean
hasClaim(java.lang.String key)
java.util.Set<java.lang.String>
keys()
void
load(java.lang.String base64JsonObject)
void
load(org.json.JSONObject jsonObject)
void
removeClaim(java.lang.String key)
void
setClaim(java.lang.String key, JwtSubClaimObject subClaimObject)
void
setClaim(java.lang.String key, java.lang.Boolean value)
void
setClaim(java.lang.String key, java.lang.Character value)
void
setClaim(java.lang.String key, java.lang.Integer value)
void
setClaim(java.lang.String key, java.lang.Long value)
void
setClaim(java.lang.String key, java.lang.String value)
void
setClaim(java.lang.String key, java.util.Date value)
void
setClaim(java.lang.String key, java.util.List<?> values)
void
setClaim(java.lang.String key, org.json.JSONArray values)
void
setClaim(java.lang.String key, org.json.JSONObject values)
void
setClaimFromJsonObject(java.lang.String key, java.lang.Object attribute)
void
setClaimObject(java.lang.String key, java.lang.Object value, boolean overrideValue)
void
setNullClaim(java.lang.String key)
java.lang.String
toBase64JsonObject()
org.json.JSONObject
toJsonObject()
java.lang.String
toJsonString()
java.util.Map<java.lang.String,java.util.List<java.lang.String>>
toMap()
-
-
-
Constructor Detail
-
JwtClaimSet
protected JwtClaimSet()
-
JwtClaimSet
protected JwtClaimSet(org.json.JSONObject jsonObject)
-
JwtClaimSet
protected JwtClaimSet(java.lang.String base64JsonObject) throws InvalidJwtException
- Throws:
InvalidJwtException
-
-
Method Detail
-
keys
public java.util.Set<java.lang.String> keys()
-
getClaim
public java.lang.Object getClaim(java.lang.String key)
-
hasClaim
public boolean hasClaim(java.lang.String key)
-
getClaimAsString
public java.lang.String getClaimAsString(java.lang.String key)
-
getClaimAsJSON
public org.json.JSONObject getClaimAsJSON(java.lang.String key)
-
getClaimAsStringList
public java.util.List<java.lang.String> getClaimAsStringList(java.lang.String key)
-
getClaimAsDate
public java.util.Date getClaimAsDate(java.lang.String key)
-
getClaimAsInteger
public java.lang.Integer getClaimAsInteger(java.lang.String key)
-
getClaimAsLong
public java.lang.Long getClaimAsLong(java.lang.String key)
-
getClaimAsCharacter
public java.lang.Character getClaimAsCharacter(java.lang.String key)
-
setClaimObject
public void setClaimObject(java.lang.String key, java.lang.Object value, boolean overrideValue)
-
setNullClaim
public void setNullClaim(java.lang.String key)
-
setClaim
public void setClaim(java.lang.String key, java.lang.String value)
-
setClaim
public void setClaim(java.lang.String key, java.util.Date value)
-
setClaim
public void setClaim(java.lang.String key, java.lang.Boolean value)
-
setClaim
public void setClaim(java.lang.String key, java.lang.Integer value)
-
setClaim
public void setClaim(java.lang.String key, java.lang.Long value)
-
setClaim
public void setClaim(java.lang.String key, java.lang.Character value)
-
setClaim
public void setClaim(java.lang.String key, java.util.List<?> values)
-
setClaim
public void setClaim(java.lang.String key, JwtSubClaimObject subClaimObject)
-
setClaim
public void setClaim(java.lang.String key, org.json.JSONObject values)
-
setClaim
public void setClaim(java.lang.String key, org.json.JSONArray values)
-
setClaimFromJsonObject
public void setClaimFromJsonObject(java.lang.String key, java.lang.Object attribute)
-
removeClaim
public void removeClaim(java.lang.String key)
-
toJsonObject
public org.json.JSONObject toJsonObject() throws InvalidJwtException
- Throws:
InvalidJwtException
-
toBase64JsonObject
public java.lang.String toBase64JsonObject() throws InvalidJwtException
- Throws:
InvalidJwtException
-
toJsonString
public java.lang.String toJsonString() throws InvalidJwtException
- Throws:
InvalidJwtException
-
toMap
public java.util.Map<java.lang.String,java.util.List<java.lang.String>> toMap() throws InvalidJwtException
- Throws:
InvalidJwtException
-
load
public void load(org.json.JSONObject jsonObject)
-
load
public void load(java.lang.String base64JsonObject) throws InvalidJwtException
- Throws:
InvalidJwtException
-
-