@ThreadSafe public class StsGetFederationTokenCredentialsProvider extends Object
AwsCredentialsProvider
that periodically sends a GetFederationTokenRequest
to the
AWS Security Token Service to maintain short-lived sessions to use for authentication. These sessions are updated
asynchronously in the background as they get close to expiring. If the credentials are not successfully updated asynchronously
in the background, calls to resolveCredentials()
will begin to block in an attempt to update the credentials
synchronously.
This provider creates a thread in the background to periodically update credentials. If this provider is no longer needed,
the background thread can be shut down using close()
.
This is created using builder()
.Modifier and Type | Class and Description |
---|---|
protected static class |
StsCredentialsProvider.BaseBuilder<B extends StsCredentialsProvider.BaseBuilder<B,T>,T>
Extended by child class's builders to share configuration across credential providers.
|
static class |
StsGetFederationTokenCredentialsProvider.Builder
A builder (created by
builder() ) for creating a
StsGetFederationTokenCredentialsProvider . |
Modifier and Type | Method and Description |
---|---|
static StsGetFederationTokenCredentialsProvider.Builder |
builder()
Create a builder for an
StsGetFederationTokenCredentialsProvider . |
void |
close() |
protected Credentials |
getUpdatedCredentials(StsClient stsClient)
Implemented by a child class to call STS and get a new set of credentials to be used by this provider.
|
AwsCredentials |
resolveCredentials() |
String |
toString() |
public static StsGetFederationTokenCredentialsProvider.Builder builder()
StsGetFederationTokenCredentialsProvider
.protected Credentials getUpdatedCredentials(StsClient stsClient)
public AwsCredentials resolveCredentials()
resolveCredentials
in interface AwsCredentialsProvider
public void close()
close
in interface AutoCloseable
close
in interface SdkAutoCloseable
Copyright © 2019. All rights reserved.