public async Task <ActionResult> Validate(string adminToken, string challengeCode) { if (!authService.ContainsPublisher(adminToken)) { return(NotFound()); } if (authService.Authenticate(adminToken, challengeCode)) { var subscriberId = authService.GetSubsriberId(adminToken); await databaseService.AddNewSubscriberAsync(adminToken, subscriberId); authService.Remove(adminToken); return(Accepted(new { message = "Validated", subscriberId })); } return(NotFound()); }