Package org.apache.drill.exec.oauth
Interface Tokens
- All Known Implementing Classes:
PersistentTokenTable
public interface Tokens
-
Method Summary
Modifier and TypeMethodDescriptionReturns value from tokens table that corresponds to provided plugin.Gets the current access token.getKey()
Key of {@link this} tokens table.boolean
Associates provided token with provided plugin in token table.boolean
Removes value for specified token from tokens table.void
setAccessToken
(String accessToken) Sets the access token.void
setExpiresIn
(String expiresIn) void
setRefreshToken
(String refreshToken)
-
Method Details
-
getKey
String getKey()Key of {@link this} tokens table. -
getAccessToken
String getAccessToken()Gets the current access token.- Returns:
- The current access token
-
setAccessToken
Sets the access token.- Parameters:
accessToken
- Sets the access token.
-
getRefreshToken
String getRefreshToken() -
setRefreshToken
-
setExpiresIn
-
getExpiresIn
String getExpiresIn() -
get
Returns value from tokens table that corresponds to provided plugin.- Parameters:
token
- token of the value to obtain- Returns:
- value from token table that corresponds to provided plugin
-
put
Associates provided token with provided plugin in token table.- Parameters:
token
- Token of the value to associate withvalue
- Value that will be associated with provided aliasreplace
- Whether existing value for the same token should be replaced- Returns:
true
if provided token was associated with the provided value in tokens table
-
remove
Removes value for specified token from tokens table.- Parameters:
token
- token of the value to remove- Returns:
true
if the value associated with provided token was removed from the tokens table.
-