public class DefaultJWTClaimsProvider extends Object implements JWTClaimsProvider
Modifier and Type | Field and Description |
---|---|
static long |
DEFAULT_MAX_LIFETIME |
Constructor and Description |
---|
DefaultJWTClaimsProvider() |
Modifier and Type | Method and Description |
---|---|
long |
getFutureTimeToLive()
Get how long (in seconds) a client-supplied Created Element is allowed to be in the future.
|
JwtClaims |
getJwtClaims(JWTClaimsProviderParameters jwtClaimsProviderParameters)
Get a JwtClaims object.
|
long |
getLifetime()
Get the default lifetime in seconds for issued JWT token where requestor
doesn't specify a lifetime element
|
long |
getMaxLifetime()
Get the maximum lifetime in seconds for issued JWT token
if requestor specifies lifetime element
|
protected Principal |
getPrincipal(JWTClaimsProviderParameters jwtClaimsProviderParameters)
Get the Principal (which is used as the Subject).
|
protected String |
getSubjectName(JWTClaimsProviderParameters jwtClaimsProviderParameters) |
protected void |
handleActAs(JWTClaimsProviderParameters jwtClaimsProviderParameters,
JwtClaims claims) |
protected void |
handleAudienceRestriction(JWTClaimsProviderParameters jwtClaimsProviderParameters,
JwtClaims claims)
Set the audience restriction claim.
|
protected void |
handleConditions(JWTClaimsProviderParameters jwtClaimsProviderParameters,
JwtClaims claims) |
protected void |
handleWSTrustClaims(JWTClaimsProviderParameters jwtClaimsProviderParameters,
JwtClaims claims) |
boolean |
isAcceptClientLifetime()
Is client lifetime element accepted
Default: false
|
boolean |
isFailLifetimeExceedance()
If requested lifetime exceeds shall it fail (default)
or overwrite with maximum lifetime
|
boolean |
isUseX500CN() |
void |
setAcceptClientLifetime(boolean acceptClientLifetime)
Set whether client lifetime is accepted
|
void |
setFailLifetimeExceedance(boolean failLifetimeExceedance)
If requested lifetime exceeds shall it fail (default)
or overwrite with maximum lifetime
|
void |
setFutureTimeToLive(long futureTimeToLive)
Set how long (in seconds) a client-supplied Created Element is allowed to be in the future.
|
void |
setLifetime(long lifetime)
Set the default lifetime in seconds for issued JWT tokens
|
void |
setMaxLifetime(long maxLifetime)
Set the maximum lifetime in seconds for issued JWT tokens
|
void |
setUseX500CN(boolean useX500CN) |
public static final long DEFAULT_MAX_LIFETIME
public JwtClaims getJwtClaims(JWTClaimsProviderParameters jwtClaimsProviderParameters)
getJwtClaims
in interface JWTClaimsProvider
protected String getSubjectName(JWTClaimsProviderParameters jwtClaimsProviderParameters)
protected Principal getPrincipal(JWTClaimsProviderParameters jwtClaimsProviderParameters)
protected void handleWSTrustClaims(JWTClaimsProviderParameters jwtClaimsProviderParameters, JwtClaims claims)
protected void handleConditions(JWTClaimsProviderParameters jwtClaimsProviderParameters, JwtClaims claims)
protected void handleAudienceRestriction(JWTClaimsProviderParameters jwtClaimsProviderParameters, JwtClaims claims)
protected void handleActAs(JWTClaimsProviderParameters jwtClaimsProviderParameters, JwtClaims claims)
public boolean isUseX500CN()
public void setUseX500CN(boolean useX500CN)
public long getFutureTimeToLive()
public void setFutureTimeToLive(long futureTimeToLive)
public void setLifetime(long lifetime)
default
- lifetime in secondspublic long getLifetime()
public void setMaxLifetime(long maxLifetime)
maximum
- lifetime in secondspublic long getMaxLifetime()
public boolean isAcceptClientLifetime()
public void setAcceptClientLifetime(boolean acceptClientLifetime)
public boolean isFailLifetimeExceedance()
public void setFailLifetimeExceedance(boolean failLifetimeExceedance)
Copyright © 2017 JBoss by Red Hat. All rights reserved.