Class AuthExceptionHandler
java.lang.Object
com.raphaelsalles.backend.infra.exception.AuthExceptionHandler
Handler de Exceções de Autenticação.
Propósito: Capturar erros específicos do Spring Security e retornar respostas JSON amigáveis.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<String> handleAuthenticationException(org.springframework.security.core.AuthenticationException e) Trata falhas de autenticação (ex: senha incorreta).
-
Constructor Details
-
AuthExceptionHandler
public AuthExceptionHandler()
-
-
Method Details
-
handleAuthenticationException
@ExceptionHandler(org.springframework.security.core.AuthenticationException.class) public org.springframework.http.ResponseEntity<String> handleAuthenticationException(org.springframework.security.core.AuthenticationException e) Trata falhas de autenticação (ex: senha incorreta).- Returns:
- Status 401 (Unauthorized).
-