Class StaticBearerTokenProvider
java.lang.Object
com.eqixiac.equinix.core.auth.StaticBearerTokenProvider
- All Implemented Interfaces:
BearerTokenProvider
A
BearerTokenProvider that always returns one fixed BearerToken.- Author:
- ianjones
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a provider for a fixed token.StaticBearerTokenProvider(String token) Creates a provider for a fixed token value with no known expiry. -
Method Summary
-
Constructor Details
-
StaticBearerTokenProvider
Creates a provider for a fixed token.- Parameters:
token- the token to return; must not benull
-
StaticBearerTokenProvider
Creates a provider for a fixed token value with no known expiry.- Parameters:
token- the bearer token value
-
-
Method Details
-
getToken
Description copied from interface:BearerTokenProviderReturns the token to sign requests with. Called once per (re-)authentication.- Specified by:
getTokenin interfaceBearerTokenProvider- Returns:
- the current token; must not be
null
-
toString
-