|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.security.oauth2.provider.token.JwtTokenEnhancer
public class JwtTokenEnhancer
OAuth2 token services that produces JWT encoded token values.
| Field Summary | |
|---|---|
static String |
TOKEN_ID
Field name for token id. |
| Constructor Summary | |
|---|---|
JwtTokenEnhancer()
|
|
| Method Summary | |
|---|---|
void |
afterPropertiesSet()
|
protected Map<String,Object> |
decode(String token)
|
protected String |
encode(OAuth2AccessToken accessToken,
OAuth2Authentication authentication)
|
OAuth2AccessToken |
enhance(OAuth2AccessToken accessToken,
OAuth2Authentication authentication)
Provides an opportunity for customization of an access token (e.g. |
Map<String,String> |
getKey(Principal principal)
Get the verification key for the token signatures. |
void |
setSigningKey(String key)
Sets the JWT signing key. |
void |
setVerifierKey(String key)
The key used for verifying signatures produced by this class. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String TOKEN_ID
| Constructor Detail |
|---|
public JwtTokenEnhancer()
| Method Detail |
|---|
public Map<String,String> getKey(Principal principal)
public void setSigningKey(String key)
key - the key to be used for signing JWTs.public void setVerifierKey(String key)
key - the signature verification key (typically an RSA public key)
public OAuth2AccessToken enhance(OAuth2AccessToken accessToken,
OAuth2Authentication authentication)
TokenEnhancer
enhance in interface TokenEnhanceraccessToken - the current access token with its expiration and refresh tokenauthentication - the current authentication including client and user details
protected String encode(OAuth2AccessToken accessToken,
OAuth2Authentication authentication)
protected Map<String,Object> decode(String token)
public void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||