Interface EquinixCredentialsProvider
- All Known Implementing Classes:
EquinixStaticCredentialsProvider
public interface EquinixCredentialsProvider
Supplies the
EquinixCredentials used to obtain an OAuth2 access token. The SDK calls
getCredentials() each time it authenticates - on the first API call and again whenever
the current token has expired - so a provider that returns freshly-resolved credentials can
rotate a Client Secret (or portal password) without the client being rebuilt.
EquinixStaticCredentialsProvider is the default: it returns a fixed credentials
instance. Implement this interface to source credentials elsewhere - a secrets manager, an
environment lookup, or a rotating store - and pass the provider to the client or session
constructors that accept one (e.g. new Equinix(provider), new Fabric(provider)).
- Author:
- ianjones
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionReturns the credentials to authenticate with.
-
Method Details
-
getCredentials
EquinixCredentials getCredentials()Returns the credentials to authenticate with. Called once per authentication; implementations may resolve and return a fresh instance on each call to support rotation.- Returns:
- the current Equinix credentials (must not be
null)
-