/// <summary> /// 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 /// </summary> /// <param name="callback">The callback which is executed when the asynchronous operations is completed</param> /// <param name="options">Options for executing asynchronous operation</param> public void GetIdentityIdAsync(AmazonCognitoIdentityCallback <string> callback, AsyncOptions options = null) { options = options == null ? new AsyncOptions() : options; CognitoIdentityAsyncExecutor.ExecuteAsync <string>(() => { return(GetIdentityId()); }, options, callback); }
/// <summary> /// Returns an instance of ImmutableCredentials for this instance /// </summary> /// <param name="callback">The callback which is executed when the asynchronous operations is completed</param> /// <param name="options">Options for executing asynchronous operation</param> public void GetCredentialsAsync(AmazonCognitoIdentityCallback <ImmutableCredentials> callback, AsyncOptions options = null) { options = options == null ? new AsyncOptions() : options; CognitoIdentityAsyncExecutor.ExecuteAsync <ImmutableCredentials>(() => { return(GetCredentials()); }, options, callback); }
/// <summary> /// Returns an instance of ImmutableCredentials for this instance /// </summary> /// <param name="callback">The callback which is executed when the asynchronous operations is completed</param> /// <param name="options">Options for executing asynchronous operation</param> public void GetCredentialsAsync(AmazonCognitoIdentityCallback <ImmutableCredentials> callback, AsyncOptions options = null) { if (UnityEngine.Application.platform == UnityEngine.RuntimePlatform.WebGLPlayer) { GetCredentialsWebGL(credentials => { var result = new AmazonCognitoIdentityResult <ImmutableCredentials>(credentials); callback(result); }); } else { options = options == null ? new AsyncOptions() : options; CognitoIdentityAsyncExecutor.ExecuteAsync <ImmutableCredentials>(() => { return(GetCredentials()); }, options, callback); } }
public void GetCredentialsAsync(AmazonCognitoIdentityCallback <ImmutableCredentials> callback, AsyncOptions options = null) { options = ((options == null) ? new AsyncOptions() : options); CognitoIdentityAsyncExecutor.ExecuteAsync(() => GetCredentials(), options, callback); }
public void GetIdentityIdAsync(AmazonCognitoIdentityCallback <string> callback, AsyncOptions options = null) { options = ((options == null) ? new AsyncOptions() : options); CognitoIdentityAsyncExecutor.ExecuteAsync(() => GetIdentityId(), options, callback); }