C# Class Amazon.CognitoIdentity.CognitoAWSCredentials

Temporary, short-lived session credentials that are automatically retrieved from Amazon Cognito Identity Service and AWS Security Token Service. Depending on configured Logins, credentials may be authenticated or unauthenticated.
Inheritance: Amazon.Runtime.RefreshingAWSCredentials
Afficher le fichier Open project: aws/aws-sdk-net Class Usage Examples

Méthodes publiques

Méthode Description
CacheIdentityId ( string identityId ) : void

Caches the identity id retrieved from Cognito.

For Unity, the Identity id is stored in PlayerPrefs property.

ClearIdentityCache ( ) : void

Clears the currently identity id from the cache.

GetCachedIdentityId ( ) : string

Gets the previously cached the identity id retrieved from Cognito. For Unity, the Identity id is stored in PlayerPrefs

GetCredentialsAsync ( AmazonCognitoIdentityCallback callback, AsyncOptions options = null ) : void

Returns an instance of ImmutableCredentials for this instance

GetIdentityIdAsync ( AmazonCognitoIdentityCallback callback, AsyncOptions options = null ) : void

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

Private Methods

Méthode Description
CacheCredentials ( CredentialsRefreshState credentialsState ) : void

Caches the credentials to player pref's

GetCachedCredentials ( ) : CredentialsRefreshState

Gets the cached credentials state

GetCredentialsForIdentity ( GetCredentialsForIdentityRequest getCredentialsRequest ) : Amazon.CognitoIdentity.Model.GetCredentialsForIdentityResponse
GetOpenId ( Amazon.CognitoIdentity.Model.GetOpenIdTokenRequest getTokenRequest ) : GetOpenIdTokenResponse
GetStsCredentials ( AssumeRoleWithWebIdentityRequest assumeRequest ) : Credentials

Method Details

CacheIdentityId() public méthode

Caches the identity id retrieved from Cognito.

For Unity, the Identity id is stored in PlayerPrefs property.

public CacheIdentityId ( string identityId ) : void
identityId string The Cognito identity id to cache
Résultat void

ClearIdentityCache() public méthode

Clears the currently identity id from the cache.
public ClearIdentityCache ( ) : void
Résultat void

GetCachedIdentityId() public méthode

Gets the previously cached the identity id retrieved from Cognito. For Unity, the Identity id is stored in PlayerPrefs
public GetCachedIdentityId ( ) : string
Résultat string

GetCredentialsAsync() public méthode

Returns an instance of ImmutableCredentials for this instance
public GetCredentialsAsync ( AmazonCognitoIdentityCallback callback, AsyncOptions options = null ) : void
callback AmazonCognitoIdentityCallback The callback which is executed when the asynchronous operations is completed
options Amazon.Runtime.AsyncOptions Options for executing asynchronous operation
Résultat void

GetIdentityIdAsync() public méthode

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
public GetIdentityIdAsync ( AmazonCognitoIdentityCallback callback, AsyncOptions options = null ) : void
callback AmazonCognitoIdentityCallback The callback which is executed when the asynchronous operations is completed
options Amazon.Runtime.AsyncOptions Options for executing asynchronous operation
Résultat void