public async Task <ResultDto <AuthenticatedDto> > Auth([FromBody] AuthDto authDto) { var authDtoValidador = new AuthDtoValidate(authDto); if (!authDtoValidador.Validate()) { return(ResultDto <AuthenticatedDto> .Validation(authDtoValidador.Mensagens)); } return(await _userService.Login(authDto)); }
public async Task <ResultDto <AuthenticatedDto> > AuthFacebook([FromBody] AuthDto authDto) { var authDtoValidador = new AuthDtoValidate(authDto); if (!authDtoValidador.Validate()) { return(ResultDto <AuthenticatedDto> .Validation("Autenticação facebook inválida!")); } authDto.IsGoogle = false; authDto.IsFacebook = true; return(await _userService.LoginSocial(authDto)); }