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} tokens table.invalid @link
{@link thisbooleanAssociates provided token with provided plugin in token table.booleanRemoves value for specified token from tokens table.voidsetAccessToken(String accessToken) Sets the access token.voidsetExpiresIn(String expiresIn) voidsetRefreshToken(String refreshToken)
-
Method Details
-
getKey
String getKey()Key of} tokens table.invalid @link
{@link this -
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:
trueif 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:
trueif the value associated with provided token was removed from the tokens table.
-