Class FederatedAWSCredentials
Temporary credentials that are created following successful authentication with a federated endpoint supporting SAML.
public class FederatedAWSCredentials : RefreshingAWSCredentials, IDisposable
- Inheritance
-
FederatedAWSCredentials
- Implements
- Inherited Members
Remarks
In order to use the FederatedAWSCredentials class the AWSSDK.SecurityToken assembly must be available to your application at runtime.
Constructors
FederatedAWSCredentials(SAMLEndpoint, string)
Constructs an instance of FederatedAWSCredentials. After construction call GetCredentials to authenticate the user/process and obtain temporary AWS credentials.
public FederatedAWSCredentials(SAMLEndpoint samlEndpoint, string roleArn)
Parameters
samlEndpoint
SAMLEndpointThe SAML endpoint used for authentication.
roleArn
stringThe role ARN used for authentication.
FederatedAWSCredentials(SAMLEndpoint, string, FederatedAWSCredentialsOptions)
Constructs an instance of FederatedAWSCredentials. After construction call GetCredentials to authenticate the user/process and obtain temporary AWS credentials.
public FederatedAWSCredentials(SAMLEndpoint samlEndpoint, string roleArn, FederatedAWSCredentialsOptions options)
Parameters
samlEndpoint
SAMLEndpointThe SAML endpoint used for authentication.
roleArn
stringThe role ARN used for authentication.
options
FederatedAWSCredentialsOptionsThe options used for authentication. See FederatedAWSCredentialsOptions for details about available options.
Properties
Options
The options used for authentication. See FederatedAWSCredentialsOptions for details about available options.
public FederatedAWSCredentialsOptions Options { get; }
Property Value
RoleArn
The role ARN used for authentication.
public string RoleArn { get; }
Property Value
SAMLEndpoint
The SAML Endpoint used for authentication.
public SAMLEndpoint SAMLEndpoint { get; }
Property Value
Methods
ClearCredentials()
Clears currently-stored credentials, forcing the next GetCredentials call to generate new credentials.
public override void ClearCredentials()
GenerateNewCredentials()
Refresh credentials after expiry. If the role profile is configured with user identity information and a callback has been registered to obtain the user credential, the callback will be invoked ahead of authentication. For role profiles configured with user identity but no callback registration, the SDK will fall back to attempting to use the default user identity of the current process.
protected override RefreshingAWSCredentials.CredentialsRefreshState GenerateNewCredentials()