Example usage for com.amazonaws.auth AWSSessionCredentials getAWSAccessKeyId

List of usage examples for com.amazonaws.auth AWSSessionCredentials getAWSAccessKeyId

Introduction

In this page you can find the example usage for com.amazonaws.auth AWSSessionCredentials getAWSAccessKeyId.

Prototype

public String getAWSAccessKeyId();

Source Link

Document

Returns the AWS access key ID for this credentials object.

Usage

From source file:io.fineo.client.auth.CognitoCachingCredentialsProvider.java

License:Open Source License

/**
 * Save the credentials to SharedPreferences
 *///from   w  w w.ja v a2 s  .  c  o  m
private void saveCredentials(AWSSessionCredentials sessionCredentials, long time) {
    LOG.debug(TAG, "Saving credentials to SharedPreferences");
    if (sessionCredentials != null) {
        cache.put(namespace(AK_KEY), sessionCredentials.getAWSAccessKeyId());
        cache.put(namespace(SK_KEY), sessionCredentials.getAWSSecretKey());
        cache.put(namespace(ST_KEY), sessionCredentials.getSessionToken());
        cache.put(namespace(EXP_KEY), Long.toString(time));
    }
}