public class JWTTokenProvider extends Object implements TokenProvider
Modifier and Type | Field and Description |
---|---|
static String |
JWT_TOKEN_TYPE |
Constructor and Description |
---|
JWTTokenProvider() |
Modifier and Type | Method and Description |
---|---|
boolean |
canHandleToken(String tokenType)
Return true if this TokenProvider implementation is capable of providing a token
that corresponds to the given TokenType.
|
boolean |
canHandleToken(String tokenType,
String realm)
Return true if this TokenProvider implementation is capable of providing a token
that corresponds to the given TokenType in a given realm.
|
TokenProviderResponse |
createToken(TokenProviderParameters tokenParameters)
Create a token given a TokenProviderParameters
|
JWTClaimsProvider |
getJwtClaimsProvider() |
Map<String,RealmProperties> |
getRealmMap()
Get the map of realm->RealmProperties for this token provider
|
boolean |
isSignToken()
Return whether the provided token will be signed or not.
|
void |
setJwtClaimsProvider(JWTClaimsProvider jwtClaimsProvider) |
void |
setRealmMap(Map<String,? extends RealmProperties> realms)
Set the map of realm->RealmProperties for this token provider
|
void |
setSignToken(boolean signToken)
Set whether the provided token will be signed or not.
|
public static final String JWT_TOKEN_TYPE
public boolean canHandleToken(String tokenType)
canHandleToken
in interface TokenProvider
public boolean canHandleToken(String tokenType, String realm)
canHandleToken
in interface TokenProvider
public TokenProviderResponse createToken(TokenProviderParameters tokenParameters)
createToken
in interface TokenProvider
public boolean isSignToken()
public void setSignToken(boolean signToken)
public void setRealmMap(Map<String,? extends RealmProperties> realms)
realms
- the map of realm->RealmProperties for this token providerpublic Map<String,RealmProperties> getRealmMap()
public JWTClaimsProvider getJwtClaimsProvider()
public void setJwtClaimsProvider(JWTClaimsProvider jwtClaimsProvider)
Apache CXF