Example usage for com.amazonaws.services.securitytoken.model Credentials setSessionToken

List of usage examples for com.amazonaws.services.securitytoken.model Credentials setSessionToken

Introduction

In this page you can find the example usage for com.amazonaws.services.securitytoken.model Credentials setSessionToken.

Prototype


public void setSessionToken(String sessionToken) 

Source Link

Document

The token that users must pass to the service API to use the temporary credentials.

Usage

From source file:com.yahoo.athenz.zts.ZTSClientMock.java

License:Apache License

@Override
Credentials assumeAWSRole(String account, String roleName) {

    Credentials creds = new Credentials();
    creds.setAccessKeyId("access");
    creds.setSecretAccessKey("secret");
    creds.setSessionToken("token");
    return creds;
}