Beispiel #1
0
 private static void AssertError(AuthorizedTaskTokenValidationResult result, ValidationErrorTemplate errorTemplate)
 {
     using (new AssertionScope())
     {
         result.Should().NotBeNull();
         result.IsSuccess.Should().BeFalse();
         result.Data.Should().BeNull();
         result.Error.Should().NotBeNull();
         result.Error.ErrorCode.Should().Be(errorTemplate.ErrorCode);
     }
 }
Beispiel #2
0
        private async Task OnTransactionComplete(User user, AuthorizedTaskTokenValidationResult validationResult)
        {
            _userContextCache.Clear(user.UserId);

            await _userSecurityStampUpdateHelper.OnTransactionCompleteAsync(user);

            await _messageAggregator.PublishAsync(new UserAccountRecoveryCompletedMessage()
            {
                UserAreaCode     = user.UserAreaCode,
                UserId           = user.UserId,
                AuthorizedTaskId = validationResult.Data.AuthorizedTaskId
            });

            await _messageAggregator.PublishAsync(new UserPasswordUpdatedMessage()
            {
                UserAreaCode = user.UserAreaCode,
                UserId       = user.UserId
            });
        }
Beispiel #3
0
 private void OnTransactionComplete(AuthorizedTaskTokenValidationResult validationResult)
 {
     _userContextCache.Clear(validationResult.Data.UserId);
 }