public class PersistentTokenTable extends Object implements Tokens
| Modifier and Type | Field and Description |
|---|---|
String |
ACCESS_TOKEN_KEY |
String |
REFRESH_TOKEN_KEY |
| Constructor and Description |
|---|
PersistentTokenTable(Map<String,String> tokens,
String key,
PersistentTokenRegistry.StoreProvider storeProvider) |
| Modifier and Type | Method and Description |
|---|---|
String |
get(String token)
Returns value from tokens table that corresponds to provided plugin.
|
String |
getAccessToken()
Gets the current access token.
|
String |
getKey()
Key of
this tokens table. |
String |
getRefreshToken() |
Map<String,String> |
getTokens() |
boolean |
put(String token,
String value,
boolean replace)
Associates provided token with provided plugin in token table.
|
boolean |
remove(String token)
Removes value for specified token from tokens table.
|
void |
setAccessToken(String token)
Sets the access token.
|
void |
setRefreshToken(String token) |
public final String ACCESS_TOKEN_KEY
public final String REFRESH_TOKEN_KEY
public PersistentTokenTable(Map<String,String> tokens, String key, PersistentTokenRegistry.StoreProvider storeProvider)
public String get(String token)
Tokenspublic boolean put(String token, String value, boolean replace)
Tokensput in interface Tokenstoken - Token of the value to associate withvalue - Value that will be associated with provided aliasreplace - Whether existing value for the same token should be replacedtrue if provided token was associated with
the provided value in tokens tablepublic String getAccessToken()
TokensgetAccessToken in interface Tokenspublic String getRefreshToken()
getRefreshToken in interface Tokenspublic void setAccessToken(String token)
TokenssetAccessToken in interface Tokenstoken - Sets the access token.public void setRefreshToken(String token)
setRefreshToken in interface Tokenspublic boolean remove(String token)
TokensCopyright © 2022 The Apache Software Foundation. All rights reserved.