Class BasicCdpCredentials
- java.lang.Object
-
- com.cloudera.cdp.authentication.credentials.BasicCdpCredentials
-
- All Implemented Interfaces:
CdpCredentials
public class BasicCdpCredentials extends Object implements 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
Constructors Constructor Description BasicCdpCredentials(String accessToken)
Constructor.BasicCdpCredentials(String accessKeyId, String privateKey)
Constructor.BasicCdpCredentials(String accessKeyId, PrivateKey privateKey)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getAccessKeyId()
Returns the CDP access key ID for this credentials object.String
getAccessToken()
Returns the CDP access token for this credentials object.PrivateKey
getPrivateKey()
Returns the private key for this credentials object.Boolean
isValid()
Returns 'true' if the credential is valid, 'false' otherwise.
-
-
-
Constructor Detail
-
BasicCdpCredentials
public BasicCdpCredentials(String accessKeyId, String privateKey)
Constructor.- Parameters:
accessKeyId
- the CDP access key IDprivateKey
- the CDP private key
-
BasicCdpCredentials
public BasicCdpCredentials(String accessKeyId, PrivateKey privateKey)
Constructor.- Parameters:
accessKeyId
- the CDP access key IDprivateKey
- the CDP private key
-
BasicCdpCredentials
public BasicCdpCredentials(String accessToken)
Constructor.- Parameters:
accessToken
- the CDP access token
-
-
Method Detail
-
getAccessKeyId
public String 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
public PrivateKey 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
public String 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
public Boolean 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.
-
-