public async Task <IActionResult> Authenticate([FromBody] AuthenticateUserRequest request) { var loginPayload = new Dictionary <string, object>(); loginPayload.AuthenticationPayload(request, settings); var response = await userApi.AuthenticateUser(loginPayload); if (!response.IsSuccessStatusCode) { return(BadRequest()); } return(Ok(await response.Content.ReadAsStringAsync())); }