@groovy.transform.Trait trait TokenStorageService extends java.lang.Object
Implementations of this trait are responsible to load user information from a token storage system, and to store token information into it.
| Type Params | Return Type | Name and description |
|---|---|---|
|
abstract UserDetails |
loadUserByToken(java.lang.String tokenValue)Returns a principal object given the passed token value |
|
abstract void |
removeToken(java.lang.String tokenValue)Removes a token from the storage. |
|
void |
storeToken(java.lang.String tokenValue, UserDetails principal)Stores a token. |
|
void |
storeToken(AccessToken accessToken)Stores the access token. |
| Methods inherited from class | Name |
|---|---|
class java.lang.Object |
java.lang.Object#equals(java.lang.Object), java.lang.Object#getClass(), java.lang.Object#hashCode(), java.lang.Object#notify(), java.lang.Object#notifyAll(), java.lang.Object#toString(), java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int) |
Returns a principal object given the passed token value
Removes a token from the storage.
Stores a token. It receives the principal to store any additional information together with the token, like the username associated.
Stores the access token. Allows for handling of refresh token and other JWT claims as needed.