Class BasicEquinixCredentials
java.lang.Object
com.eqixiac.equinix.core.auth.BasicEquinixCredentials
- All Implemented Interfaces:
EquinixCredentials
Standard implementation of
EquinixCredentials using OAuth2 client credentials.
This is the primary way to authenticate with Equinix Platform APIs. Provide your Client ID and Client Secret obtained from the Equinix Developer Portal.
Usage
BasicEquinixCredentials credentials = new BasicEquinixCredentials("clientId", "clientSecret");
Fabric fabric = new Fabric(credentials);
- Author:
- ianjones
-
Constructor Summary
ConstructorsConstructorDescriptionBasicEquinixCredentials(String accessKey, String secretKey) Creates credentials using the given OAuth2 Client ID and Client Secret. -
Method Summary
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface EquinixCredentials
getAccessKey, getSecretKeyModifier and TypeMethodDescriptionReturns the OAuth2 Client ID (access key) for API authentication.Returns the OAuth2 Client Secret (secret key) for API authentication.
-
Constructor Details
-
BasicEquinixCredentials
Creates credentials using the given OAuth2 Client ID and Client Secret.- Parameters:
accessKey- the OAuth2 Client ID from the Equinix Developer PortalsecretKey- the OAuth2 Client Secret from the Equinix Developer Portal- Throws:
IllegalArgumentException- if either value is null or blank - failing here with a clear message rather than as a confusing 400/401 on the first API call
-