Exemplo n.º 1
0
        //  /Home/[email protected]&code={VerificationCode}

        public ActionResult VerifyUser(string email, string code)
        {
            var cmd = new VerifyUserEmail
            {
                EmailAddress     = email,
                VerificationCode = code
            };

            ServiceBus.Bus.Send(cmd);

            return(Json(new { sent = cmd }));
        }
Exemplo n.º 2
0
        public void Handle(VerifyUserEmail message)
        {
            if (message.VerificationCode == this.Data.VerificationCode)
            {
                Bus.Send(new CreateUserWithVerifiedEmail
                {
                    EmailAddress = this.Data.EmailAddress,
                    Name         = this.Data.Name
                });

                this.MarkAsComplete();
            }
        }