@Immutable public final class AwsSessionCredentials extends Object implements AwsCredentials
AwsCredentials
that provides a session token to be used in service authentication. Session
tokens are typically provided by a token broker service, like AWS Security Token Service, and provide temporary access to an
AWS service.Modifier and Type | Method and Description |
---|---|
String |
accessKeyId()
Retrieve the AWS access key, used to identify the user interacting with AWS.
|
static AwsSessionCredentials |
create(String accessKey,
String secretKey,
String sessionToken)
Constructs a new session credentials object, with the specified AWS access key, AWS secret key and AWS session token.
|
boolean |
equals(Object o) |
int |
hashCode() |
String |
secretAccessKey()
Retrieve the AWS secret access key, used to authenticate the user interacting with AWS.
|
String |
sessionToken()
Retrieve the AWS session token.
|
String |
toString() |
public static AwsSessionCredentials create(String accessKey, String secretKey, String sessionToken)
accessKey
- The AWS access key, used to identify the user interacting with AWS.secretKey
- The AWS secret access key, used to authenticate the user interacting with AWS.sessionToken
- The AWS session token, retrieved from an AWS token service, used for authenticating that this user has
received temporary permission to access some resource.public String accessKeyId()
accessKeyId
in interface AwsCredentials
public String secretAccessKey()
secretAccessKey
in interface AwsCredentials
public String sessionToken()
Copyright © 2022. All rights reserved.