Class AuthService
java.lang.Object
com.order.api01authgateway.service.AuthService
Service component responsible for handling user authentication business logic.
This service coordinates the authentication process by verifying credentials against
configured identity providers and generating secure access tokens using JwtService.
It relies on Spring Security's AuthenticationManager to perform BCrypt-based
password verification.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionauthenticate(LoginRequest request) Authenticates a user and returns a token response.
-
Constructor Details
-
AuthService
public AuthService()
-
-
Method Details
-
authenticate
Authenticates a user and returns a token response.- Parameters:
request- The login request containing username and password.- Returns:
- A
TokenResponsecontaining the generated JWT. - Throws:
org.springframework.security.core.AuthenticationException- If authentication fails (e.g., bad credentials).
-