Beispiel #1
0
        public async Task <IActionResult> PrimaryAuthentication(
            [FromBody] CustomIdentityUserDto userAuthenticationInfo,
            [FromServices] IAsyncHandler <CustomIdentityUserWithRolesDto, ConfirmationCodeDto> primarySignupHandler)
        {
            await primarySignupHandler.Handle(
                new CustomIdentityUserWithRolesDto(userAuthenticationInfo.UserName, userAuthenticationInfo.UserEmail,
                                                   userAuthenticationInfo.Password), CancellationToken.None);

            return(Ok());
        }
        public async Task <ActionResult <ConfirmInfoDto> > Index(
            [WorkFlow(typeof(TestWorkflow))]
            IAsyncHandler <CreateNewUserInputDto, ActionResult <ConfirmInfoDto> > handler,
            CreateNewUserInputDto dto)
        {
            var s  = (double)12 / 0;
            var ct = CancellationToken.None;

            return(await handler.Handle(dto, ct));
        }
 public async Task <ActionResult <ConfirmInfoDto> > Index(
     [WorkFlow(typeof(TestWorkflow))] IAsyncHandler <CreateNewUserInputDto, ActionResult <ConfirmInfoDto> > handler,
     CreateNewUserInputDto dto) => await handler.Handle(dto, CancellationToken.None);
Beispiel #4
0
 public async Task <ResetPasswordDto> RecoveryPassword(
     [FromBody] TokenEmailPasswordDto authDto,
     [FromServices] IAsyncHandler <TokenEmailPasswordDto, ResetPasswordDto> secondaryRecoveryPasswordHandler)
 {
     return(await secondaryRecoveryPasswordHandler.Handle(authDto, CancellationToken.None));
 }
Beispiel #5
0
 public async Task ForgotPassword(
     [FromBody] ForgotPasswordDto forgotPasswordDto,
     [FromServices] IAsyncHandler <ForgotPasswordDto, SimplyHandlerResult> recoveryForgotPasswordHandler)
 {
     await recoveryForgotPasswordHandler.Handle(forgotPasswordDto, CancellationToken.None);
 }
Beispiel #6
0
 public async Task SecondaryAuthentication(
     [FromServices] IAsyncHandler <TokenEmailDto, SimplyHandlerResult> secondaryAuthService,
     [FromQuery] TokenEmailDto authDto)
 {
     await secondaryAuthService.Handle(authDto, CancellationToken.None);
 }
 public async Task <TOut> Handle(TIn input, CancellationToken ct)
 {
     return(await _asyncHandler.Handle(input, ct));
 }
 public async Task Handle(TIn input, CancellationToken cancellationToken)
 {
     await _handler.Handle(input, cancellationToken);
 }