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 Details

    • BasicCdpCredentials

      public BasicCdpCredentials(String accessKeyId, String privateKey)
      Constructor.
      Parameters:
      accessKeyId - the CDP access key ID
      privateKey - the CDP private key
    • BasicCdpCredentials

      public BasicCdpCredentials(String accessKeyId, PrivateKey privateKey)
      Constructor.
      Parameters:
      accessKeyId - the CDP access key ID
      privateKey - the CDP private key
    • BasicCdpCredentials

      public BasicCdpCredentials(String accessToken)
      Constructor.
      Parameters:
      accessToken - the CDP access token
  • Method Details

    • getAccessKeyId

      public String getAccessKeyId()
      Description copied from interface: CdpCredentials
      Returns the CDP access key ID for this credentials object.
      Specified by:
      getAccessKeyId in interface CdpCredentials
      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 interface CdpCredentials
      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 interface CdpCredentials
      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 interface CdpCredentials
      Returns:
      'true' if the credential is valid, 'false' otherwise.