internal override async Task <string> ConfirmAndGrabValidationTokenAsync(IdentityVerificationAttempt attempt, VirgilClient client) { var token = await client.ConfirmIdentityAsync(attempt.ActionId, this.confirmationCode, (int)attempt.TimeToLive.TotalSeconds, attempt.CountToLive).ConfigureAwait(false); return(token); }
/// <summary> /// Initiates an identity verification process for current Card indentity type. It is only working for /// Global identity types like Email. /// </summary> /// <returns>An instance of <see cref="IdentityVerificationAttempt"/> that contains /// information about operation etc...</returns> /// Find the usage at the example <see cref="PublishAsGlobalAsync(IdentityValidationToken identityToken)"/> public async Task <IdentityVerificationAttempt> CheckIdentityAsync(IdentityVerificationOptions options = null) { var actionId = await this.context.Client .VerifyIdentityAsync(this.Identity, this.IdentityType, options?.ExtraFields) .ConfigureAwait(false); var attempt = new IdentityVerificationAttempt(this.context) { ActionId = actionId, TimeToLive = options?.TimeToLive ?? TimeSpan.FromSeconds(3600), CountToLive = options?.CountToLive ?? 1, IdentityType = this.IdentityType, Identity = this.Identity }; return(attempt); }
/// <summary> /// Confirms the identity verificatio and grabs a validation token. /// </summary> /// <param name="attempt">The attempt.</param> /// <param name="client">The Virgil API client.</param> /// <returns> /// A string that represents identity validation token. /// </returns> internal abstract Task <string> ConfirmAndGrabValidationTokenAsync(IdentityVerificationAttempt attempt, VirgilClient client);