| 
 | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Objectcom.amazonaws.auth.WebIdentityFederationSessionCredentialsProvider
public class WebIdentityFederationSessionCredentialsProvider
AWSCredentialsProvider implementation that uses the AWS Security Token Service to create temporary, short-lived sessions to use for authentication.
| Field Summary | |
|---|---|
| static int | DEFAULT_DURATION_SECONDSDefault duration for started sessions | 
| static int | DEFAULT_THRESHOLD_SECONDSDefault threshold for refreshing session credentials | 
| Constructor Summary | |
|---|---|
| WebIdentityFederationSessionCredentialsProvider(java.lang.String wifToken,
                                                java.lang.String wifProvider,
                                                java.lang.String roleArn)Constructs a new WebIdentityFederationSessionCredentialsProvider, which will use the specified 3rd-party web identity provider to make a request to the AWS Security Token Service (STS) to request short lived session credentials, which will then be returned by this class's getCredentials()method. | |
| WebIdentityFederationSessionCredentialsProvider(java.lang.String wifToken,
                                                java.lang.String wifProvider,
                                                java.lang.String roleArn,
                                                AWSSecurityTokenService stsClient)Constructs a new WebIdentityFederationSessionCredentialsProvider, which will use the specified 3rd-party web identity provider to make a request to the AWS Security Token Service (STS) using the provided client to request short lived session credentials, which will then be returned by this class's getCredentials()method. | |
| WebIdentityFederationSessionCredentialsProvider(java.lang.String wifToken,
                                                java.lang.String wifProvider,
                                                java.lang.String roleArn,
                                                ClientConfiguration clientConfiguration)Constructs a new WebIdentityFederationSessionCredentialsProvider, which will use the specified 3rd-party web identity provider to make a request to the AWS Security Token Service (STS) to request short lived session credentials, which will then be returned by this class's getCredentials()method. | |
| Method Summary | |
|---|---|
|  AWSCredentials | getCredentials()Returns AWSCredentials which the caller can use to authorize an AWS request. | 
|  int | getRefreshThreshold()Get the refresh threshold for the session credentials created by this client in seconds. | 
|  int | getSessionDuration()Get the duration of the session credentials created by this client in seconds. | 
|  java.lang.String | getSubjectFromWIF()Get the identifier returned from the Identity Provider for the authenticated user. | 
|  void | refresh()Forces this credentials provider to refresh its credentials. | 
|  void | setRefreshThreshold(int refreshThreshold)Set the refresh threshold for the session credentials created by this client in seconds. | 
|  void | setSessionDuration(int sessionDuration)Set the duration of the session credentials created by this client in seconds. | 
|  WebIdentityFederationSessionCredentialsProvider | withRefreshThreshold(int refreshThreshold)Set the refresh threshold for the session credentials created by this client in seconds. | 
|  WebIdentityFederationSessionCredentialsProvider | withSessionDuration(int sessionDuration)Set the duration of the session credentials created by this client in seconds. | 
| Methods inherited from class java.lang.Object | 
|---|
| equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
public static final int DEFAULT_DURATION_SECONDS
public static final int DEFAULT_THRESHOLD_SECONDS
| Constructor Detail | 
|---|
public WebIdentityFederationSessionCredentialsProvider(java.lang.String wifToken,
                                                       java.lang.String wifProvider,
                                                       java.lang.String roleArn)
getCredentials()
 method.
wifToken - The OAuth/OpenID token from the the Identity ProviderwifProvider - The name of the Identity Provider (null for OpenID providers)roleArn - The ARN of the IAM Role that will be assumed
public WebIdentityFederationSessionCredentialsProvider(java.lang.String wifToken,
                                                       java.lang.String wifProvider,
                                                       java.lang.String roleArn,
                                                       ClientConfiguration clientConfiguration)
getCredentials()
 method.
wifToken - The OAuth/OpenID token from the the Identity ProviderwifProvider - The name of the Identity Provider (null for OpenID providers)roleArn - The ARN of the IAM Role that will be assumedclientConfiguation - Configuration to apply to STS client created
public WebIdentityFederationSessionCredentialsProvider(java.lang.String wifToken,
                                                       java.lang.String wifProvider,
                                                       java.lang.String roleArn,
                                                       AWSSecurityTokenService stsClient)
getCredentials() method.
wifToken - The OAuth/OpenID token from the the Identity ProviderwifProvider - The name of the Identity Provider (null for OpenID providers)roleArn - The ARN of the IAM Role that will be assumedstsClient - Preconfigured STS client to make requests with| Method Detail | 
|---|
public AWSCredentials getCredentials()
AWSCredentialsProvider
getCredentials in interface AWSCredentialsProviderpublic void refresh()
AWSCredentialsProvider
refresh in interface AWSCredentialsProviderpublic void setSessionDuration(int sessionDuration)
sessionDuration - The new duration for session credentials created by this
              providerAssumeRoleWithWebIdentityRequestpublic WebIdentityFederationSessionCredentialsProvider withSessionDuration(int sessionDuration)
sessionDuration - The new duration for session credentials created by this
              provider
AssumeRoleWithWebIdentityRequestpublic int getSessionDuration()
AssumeRoleWithWebIdentityRequestpublic void setRefreshThreshold(int refreshThreshold)
refreshThreshold - The new refresh threshold for session credentials created by this
              providerAssumeRoleWithWebIdentityRequestpublic WebIdentityFederationSessionCredentialsProvider withRefreshThreshold(int refreshThreshold)
refreshThreshold - The new refresh threshold for session credentials created by this
              provider
AssumeRoleWithWebIdentityRequestpublic int getRefreshThreshold()
AssumeRoleWithWebIdentityRequestpublic java.lang.String getSubjectFromWIF()
AssumeRoleWithWebIdentityResult| 
 | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||