## com.baidubce.auth
Class DefaultBceCredentials

    java.lang.Object
      com.baidubce.auth.DefaultBceCredentials

All Implemented Interfaces:
  BceCredentials

Direct Known Subclasses:
  DefaultBceSessionCredentials

    public class DefaultBceCredentials

extends Object
implements BceCredentials

Default implementation of the Credentials interface that allows callers to pass in the BCE access key and secret access in the constructor.

Constructor Summary
`DefaultBceCredentials(String accessKeyId, String secretKey)` Constructs a new Credentials object, with the specified access key id and secret key.

Method Summary
`String` `getAccessKeyId()` Returns the BCE access key ID for this credentials object.
`String` `getSecretKey()` Returns the BCE secret access key for this credentials object.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DefaultBceCredentials

    public DefaultBceCredentials(String accessKeyId,
                                 String secretKey)

  Constructs a new Credentials object, with the specified access key id and secret key.

  Parameters:
    `accessKeyId` - the BCE access key id.
    `secretKey` - the BCE secret access key.
  Throws:
    `IllegalArgumentException` - The accessKeyId, secretKey should not be null or empty.

Method Detail

### getAccessKeyId

    public String getAccessKeyId()

  Description copied from interface: `BceCredentials`
  Returns the BCE access key ID for this credentials object.

  Specified by:
    `getAccessKeyId` in interface `BceCredentials`
  Returns:
    the BCE access key ID for this credentials object.
  See Also:
    `BceCredentials.getAccessKeyId()`

### getSecretKey

    public String getSecretKey()

  Description copied from interface: `BceCredentials`
  Returns the BCE secret access key for this credentials object.

  Specified by:
    `getSecretKey` in interface `BceCredentials`
  Returns:
    the BCE secret access key for this credentials object.
  See Also:
    `BceCredentials.getSecretKey()`

Copyright © 2016. All rights reserved.