public async Task <ActionResult> ValidationRequest([FromQuery] long receiverId) { var id = User.Claims.FirstOrDefault(c => c.Type == ClaimTypes.NameIdentifier).Value; var code = authService.New(id, receiverId); await mqService.PushChallengeMessage(code, receiverId); return(Ok(new ReturnMessage() { StatusCode = Model.StatusCode.Success })); }
public async Task <ActionResult> InsertSubsriber(string adminToken, int subsriberId) { if (await databaseService.IsAdminTokenValid(adminToken)) { var challengeCode = authService.GenerateChallengeCode(); authService.AddAuth(adminToken, challengeCode, subsriberId); await mqService.PushChallengeMessage(challengeCode, subsriberId); return(Accepted(new { message = "Challenge Code Sent" })); } return(NotFound()); }