Package org.wildfly.security.http.oidc
Class AccessToken
- java.lang.Object
-
- org.wildfly.security.http.oidc.JsonWebToken
-
- org.wildfly.security.http.oidc.AccessToken
-
public class AccessToken extends JsonWebToken
Representation of an access token.- Author:
- Farah Juma
-
-
Field Summary
Fields Modifier and Type Field Description private static String
ALLOWED_ORIGINS
private static String
REALM_ACCESS
private static String
RESOURCE_ACCESS
-
Fields inherited from class org.wildfly.security.http.oidc.JsonWebToken
EXP, IAT, NBF
-
-
Constructor Summary
Constructors Constructor Description AccessToken(org.jose4j.jwt.JwtClaims jwtClaims)
Construct a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>
getAllowedOrigins()
Get the allowed-origins claim.RealmAccessClaim
getRealmAccessClaim()
Get the realm_access claim.Map<String,RealmAccessClaim>
getResourceAccessClaim()
Get the resource_access claim.RealmAccessClaim
getResourceAccessClaim(String resource)
Get the resource_access claim.-
Methods inherited from class org.wildfly.security.http.oidc.JsonWebToken
getAudience, getClaimNames, getClaimValue, getClaimValue, getClaimValueAsLong, getClaimValueAsString, getExpiration, getID, getIssuedAt, getIssuer, getNotBefore, getStringListClaimValue, getSubject, hasClaim, isActive, isExpired, isNotBefore, replaceMap, wrapValue
-
-
-
-
Field Detail
-
ALLOWED_ORIGINS
private static final String ALLOWED_ORIGINS
- See Also:
- Constant Field Values
-
REALM_ACCESS
private static final String REALM_ACCESS
- See Also:
- Constant Field Values
-
RESOURCE_ACCESS
private static final String RESOURCE_ACCESS
- See Also:
- Constant Field Values
-
-
Method Detail
-
getAllowedOrigins
public List<String> getAllowedOrigins()
Get the allowed-origins claim.- Returns:
- the allowed-origins claim
-
getRealmAccessClaim
public RealmAccessClaim getRealmAccessClaim()
Get the realm_access claim.- Returns:
- the realm_access claim
- Throws:
IllegalArgumentException
- if the realm_access claim is malformed
-
getResourceAccessClaim
public Map<String,RealmAccessClaim> getResourceAccessClaim()
Get the resource_access claim.- Returns:
- the resource_access claim
- Throws:
IllegalArgumentException
- if the resource_access claim is malformed
-
getResourceAccessClaim
public RealmAccessClaim getResourceAccessClaim(String resource)
Get the resource_access claim.- Parameters:
resource
- the resource- Returns:
- the resource_access claim
- Throws:
IllegalArgumentException
- if the resource_access claim is malformed
-
-