public ActionResult <LoginVoorRaadpleegDto> AuthenticateStandhouder([FromBody] AuthenticatieStandhouderDto authenticatie) { string token = _authenticatieRepository.AuthenticeerStandhouder(authenticatie.InschrijvingsId, authenticatie.Email); if (string.IsNullOrWhiteSpace(token)) { return(NotFound($"Inschrijvingsnummer of E-mail is niet correct.")); } LoginVoorRaadpleegDto loginToReturn = new LoginVoorRaadpleegDto { Token = token }; return(Ok(loginToReturn)); }
public ActionResult <LoginVoorRaadpleegDto> AuthenticateAdministrator([FromBody] AuthenticatieAdministratorDto authenticatie) { string token = _authenticatieRepository.AuthenticeerAdministrator(authenticatie.Email, authenticatie.Wachtwoord); if (string.IsNullOrWhiteSpace(token)) { return(NotFound($"E-mail of wachtwoord is niet correct.")); } LoginVoorRaadpleegDto loginToReturn = new LoginVoorRaadpleegDto { Token = token }; return(Ok(loginToReturn)); }