AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
Namespace: Amazon.CognitoIdentity
Assembly: AWSSDK.dll
Version: (assembly version)
public class CognitoAWSCredentials : RefreshingAWSCredentials
The CognitoAWSCredentials type exposes the following members
Name | Description | |
---|---|---|
CognitoAWSCredentials(string, RegionEndpoint) | Constructs a new CognitoAWSCredentials instance, which will use the specified Amazon Cognito identity pool to get short lived session credentials. | |
CognitoAWSCredentials(string, string, string, string, RegionEndpoint) | Constructs a new CognitoAWSCredentials instance, which will use the specified Amazon Cognito identity pool to make a requests to the AWS Security Token Service (STS) to request short lived session credentials. | |
CognitoAWSCredentials(string, string, string, string, IAmazonCognitoIdentity, IAmazonSecurityTokenService) | Constructs a new CognitoAWSCredentials instance, which will use the specified Amazon Cognito identity pool to make a requests to the AWS Security Token Service (STS) to request short lived session credentials. |
Name | Type | Description | |
---|---|---|---|
AccountId | System.String | The AWS accountId for the account with Amazon Cognito | |
AuthRoleArn | System.String | The ARN of the IAM Role that will be assumed when authenticated | |
CurrentLoginProviders | System.String[] | The list of current providers that are used for authenticated credentials. | |
IdentityPoolId | System.String | The Amazon Cogntio identity pool to use | |
PreemptExpiryTime | System.TimeSpan | Inherited from Amazon.Runtime.RefreshingAWSCredentials. | |
UnAuthRoleArn | System.String | The ARN of the IAM Role that will be assumed when unauthenticated |
Name | Description | |
---|---|---|
AddLogin(string, string) | Adds a login to be used for authenticated requests. | |
CacheIdentityId(string) |
Caches the identity id retrieved from Cognito.
For the Windows Phone and Windows Store version of the SDK the identity id is stored in the Windows.Storage.ApplicationData.Current.LocalSettings or Windows.Storage.ApplicationData.Current.RoamingSettings depending on the IdentityIdCacheMode property. For the base .NET 3.5 and .NET 4.5 version of the SDK the identity id is not cached. To support caching the CacheIdentityId, GetCachedIdentityId and ClearIdentityCache methods need to be overridden. |
|
Clear() | Clears current credentials state. This will reset the IdentityId. | |
ClearIdentityCache() |
Clears the currently identity id from the cache.
For the base .NET 3.5 and .NET 4.5 version of the SDK the identity id is not cached. To support caching the CacheIdentityId, GetCachedIdentityId and ClearIdentityCache methods need to be overridden. |
|
GetCachedIdentityId() |
Gets the previously cached the identity id retrieved from Cognito.
For the Windows Phone and Windows Store version of the SDK the identity id is stored in the Windows.Storage.ApplicationData.Current.LocalSettings or Windows.Storage.ApplicationData.Current.RoamingSettings depending on the IdentityIdCacheMode property. By default IdentityIdCacheMode will be set LocalSettings. For the base .NET 3.5 and .NET 4.5 version of the SDK the identity id is not cached. To support caching the CacheIdentityId, GetCachedIdentityId and ClearIdentityCache methods need to be overridden. |
|
GetCredentials() | Inherited from Amazon.Runtime.RefreshingAWSCredentials. | |
GetIdentityId() | Gets the Identity Id corresponding to the credentials retrieved from Cognito. Note: this setting may change during execution. To be notified of its new value, attach a listener to IdentityChangedEvent | |
RemoveLogin(string) | Removes a provider from the collection of logins. |
Name | Description | |
---|---|---|
IdentityChangedEvent | Event for identity change notifications. This event will fire whenever the Identity Id changes. |
.NET Framework:
Supported in: 4.5, 4.0, 3.5
.NET for Windows Store apps:
Supported in: Windows 8.1, Windows 8
.NET for Windows Phone:
Supported in: Windows Phone 8.1, Windows Phone 8