Example usage for com.amazonaws.auth AWSSessionCredentials getAWSSecretKey

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

Introduction

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

Prototype

public String getAWSSecretKey();

Source Link

Document

Returns the AWS secret access key for this credentials object.

Usage

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

License:Open Source License

/**
 * Save the credentials to SharedPreferences
 *///  w  ww.j ava 2  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));
    }
}