Exemple #1
0
        /// <summary>
        /// Recover previously-created member, assuming they were
        /// configured with a "normal consumer" recovery rule.
        /// </summary>
        /// <param name="tokenClient">SDK client</param>
        /// <param name="alias">alias of member to recoverWithDefaultRule</param>
        /// <returns>the recovered member</returns>
        public Tokenio.Member RecoverWithDefaultRule(TokenClient tokenClient, Alias alias)
        {
            var verificationId = tokenClient.BeginRecovery(alias).Result;
            var memberId       = tokenClient.GetMemberId(alias).Result;

            var recoveredMember = tokenClient.CompleteRecoveryWithDefaultRule(
                memberId,
                verificationId,
                "1thru6").Result;

            recoveredMember.VerifyAlias(verificationId, "1thru6").Wait();

            return(recoveredMember);
        }