Package com.atlan.auth
Class APITokenManager
java.lang.Object
com.atlan.auth.TokenManager
com.atlan.auth.APITokenManager
Manage API tokens.
-
Field Summary
FieldsFields inherited from class com.atlan.auth.TokenManager
lock, token
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected String
Retrieve the header to use for Authorization using this token.protected boolean
refreshToken
(AtlanClient client) Refresh the API token.Methods inherited from class com.atlan.auth.TokenManager
getHeader, refresh
-
Field Details
-
ENVIRONMENT_VARIABLE
- See Also:
-
-
Constructor Details
-
APITokenManager
public APITokenManager(char[] token)
-
-
Method Details
-
getAuthHeader
Retrieve the header to use for Authorization using this token.- Specified by:
getAuthHeader
in classTokenManager
- Returns:
- the value for the Authorization header
-
refreshToken
Refresh the API token.- Specified by:
refreshToken
in classTokenManager
- Parameters:
client
- through which to refresh the token- Returns:
- true iff the refresh was successful
- Throws:
AtlanException
- on any API communication issue
-