コード例 #1
0
 public IObservable<TwoFactorChallengeResult> HandleTwoFactorException(TwoFactorAuthorizationException exception)
 {
     var userError = new TwoFactorRequiredUserError(exception);
     return twoFactorDialog.Show(userError)
         .ObserveOn(RxApp.MainThreadScheduler)
         .SelectMany(x =>
             x == RecoveryOptionResult.RetryOperation
                 ? Observable.Return(userError.ChallengeResult)
                 : Observable.Throw<TwoFactorChallengeResult>(exception));
 }
コード例 #2
0
 public TwoFactorRequiredUserError(TwoFactorAuthorizationException exception)
     : base(exception.Message, innerException: exception)
 {
     TwoFactorType = exception.TwoFactorType;
     RetryFailed = exception is TwoFactorChallengeFailedException;
 }