com.baidubce.auth
Class DefaultBceSessionCredentials

java.lang.Object
  extended by com.baidubce.auth.DefaultBceCredentials
      extended by com.baidubce.auth.DefaultBceSessionCredentials
All Implemented Interfaces:
BceCredentials, BceSessionCredentials

public class DefaultBceSessionCredentials
extends DefaultBceCredentials
implements BceSessionCredentials

Default implementation of the BceTokenCredentials interface that allows callers to pass in the BCE access key id, secret key and session token in the constructor.


Constructor Summary
DefaultBceSessionCredentials(String accessKeyId, String secretKey, String sessionToken)
          Constructs a new Credentials object, with the specified access key id, secret key and session token.
 
Method Summary
 String getSessionToken()
          Returns the session token for this credentials object.
 
Methods inherited from class com.baidubce.auth.DefaultBceCredentials
getAccessKeyId, getSecretKey
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.baidubce.auth.BceCredentials
getAccessKeyId, getSecretKey
 

Constructor Detail

DefaultBceSessionCredentials

public DefaultBceSessionCredentials(String accessKeyId,
                                    String secretKey,
                                    String sessionToken)
Constructs a new Credentials object, with the specified access key id, secret key and session token.

Parameters:
accessKeyId - the BCE access key id.
secretKey - the BCE secret access key.
sessionToken - the BCE session token.
Throws:
IllegalArgumentException - The accessKeyId, secretKey and sessionToken should not be null or empty.
Method Detail

getSessionToken

public String getSessionToken()
Description copied from interface: BceSessionCredentials
Returns the session token for this credentials object.

Specified by:
getSessionToken in interface BceSessionCredentials
Returns:
the session token for this credentials object.
See Also:
BceSessionCredentials.getSessionToken()


Copyright © 2018. All rights reserved.