Package com.fullcontact.apilib.auth
Class DefaultCredentialProvider
- java.lang.Object
-
- com.fullcontact.apilib.auth.DefaultCredentialProvider
-
- All Implemented Interfaces:
CredentialsProvider
public class DefaultCredentialProvider extends java.lang.Object implements CredentialsProvider
Default way of providing authentication through Environment variables
-
-
Constructor Summary
Constructors Constructor Description DefaultCredentialProvider()Default constructor looks for API key at environment variable 'FC_API_KEY'DefaultCredentialProvider(java.lang.String envVar)Parameterized constructor to provide a different environment variable name for API key
-
Method Summary
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.fullcontact.apilib.auth.CredentialsProvider
getApiKey
-
-
-
-
Constructor Detail
-
DefaultCredentialProvider
public DefaultCredentialProvider() throws FullContactExceptionDefault constructor looks for API key at environment variable 'FC_API_KEY'- Throws:
FullContactException- Exception if key is not found or is empty
-
DefaultCredentialProvider
public DefaultCredentialProvider(java.lang.String envVar) throws FullContactExceptionParameterized constructor to provide a different environment variable name for API key- Parameters:
envVar- Environment variable where API key is stored- Throws:
FullContactException- Exception if key is not found or is empty
-
-