Class BasicCdpCredentials
java.lang.Object
com.cloudera.cdp.authentication.credentials.BasicCdpCredentials
- All Implemented Interfaces:
CdpCredentials
Basic implementation of the CdpCredentials interface that allows callers
to pass in the CDP access key ID and private key in the constructor.
-
Constructor Summary
ConstructorDescriptionBasicCdpCredentials
(String accessToken) Constructor.BasicCdpCredentials
(String accessKeyId, String privateKey) Constructor.BasicCdpCredentials
(String accessKeyId, PrivateKey privateKey) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionReturns the CDP access key ID for this credentials object.Returns the CDP access token for this credentials object.Returns the private key for this credentials object.isValid()
Returns 'true' if the credential is valid, 'false' otherwise.
-
Constructor Details
-
BasicCdpCredentials
Constructor.- Parameters:
accessKeyId
- the CDP access key IDprivateKey
- the CDP private key
-
BasicCdpCredentials
Constructor.- Parameters:
accessKeyId
- the CDP access key IDprivateKey
- the CDP private key
-
BasicCdpCredentials
Constructor.- Parameters:
accessToken
- the CDP access token
-
-
Method Details
-
getAccessKeyId
Description copied from interface:CdpCredentials
Returns the CDP access key ID for this credentials object.- Specified by:
getAccessKeyId
in interfaceCdpCredentials
- Returns:
- The CDP access key ID for this credentials object.
-
getPrivateKey
Description copied from interface:CdpCredentials
Returns the private key for this credentials object.- Specified by:
getPrivateKey
in interfaceCdpCredentials
- Returns:
- The private key for this credentials object.
-
getAccessToken
Description copied from interface:CdpCredentials
Returns the CDP access token for this credentials object.- Specified by:
getAccessToken
in interfaceCdpCredentials
- Returns:
- The CDP access token for this credentials object.
-
isValid
Description copied from interface:CdpCredentials
Returns 'true' if the credential is valid, 'false' otherwise.- Specified by:
isValid
in interfaceCdpCredentials
- Returns:
- 'true' if the credential is valid, 'false' otherwise.
-