C# Класс 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.
Наследование: Amazon.Runtime.RefreshingAWSCredentials
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
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

Описание методов

CacheIdentityId() публичный метод

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
Результат void

ClearIdentityCache() публичный метод

Clears the currently identity id from the cache.
public ClearIdentityCache ( ) : void
Результат void

GetCachedIdentityId() публичный метод

Gets the previously cached the identity id retrieved from Cognito. For Unity, the Identity id is stored in PlayerPrefs
public GetCachedIdentityId ( ) : string
Результат string

GetCredentialsAsync() публичный метод

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
Результат void

GetIdentityIdAsync() публичный метод

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
Результат void