public async Task <IEnumerable <PersonalCard> > Finish(IdentityTokenRequest request, string confirmationCode) { var services = ServiceLocator.Services; var confirmedInfo = await request.Confirm(confirmationCode, new ConfirmOptions(3600, this.setup.Count())) .ConfigureAwait(false); var list = this.setup.Select(async card => { var grabResponse = await services.PrivateKeys.Get(card.Id, confirmedInfo) .ConfigureAwait(false); var privateKey = new PrivateKey(grabResponse.PrivateKey); var cards = await services.Cards.GetCardsRealtedToThePublicKey(card.PublicKeyId, card.Id, privateKey) .ConfigureAwait(false); return(cards.Select(it => new PersonalCard(it, privateKey)).ToList()); }).ToList(); await Task.WhenAll(list) .ConfigureAwait(false); var personalCards = list.SelectMany(i => i.Result).ToList(); return(personalCards); }
public static async Task <IdentityTokenRequest> Verify(string value, VerifiableIdentityType type = VerifiableIdentityType.Email) { return(await IdentityTokenRequest.Verify(value, type).ConfigureAwait(false)); }
public async Task <IdentityTokenRequest> Verify() { return(await IdentityTokenRequest.Verify(this.Value, this.Type).ConfigureAwait(false)); }