Package org.localify.auth.jwt
Class JwtAuthenticationConverter
java.lang.Object
org.localify.auth.jwt.JwtAuthenticationConverter
- All Implemented Interfaces:
org.springframework.security.web.authentication.AuthenticationConverter
public class JwtAuthenticationConverter
extends Object
implements org.springframework.security.web.authentication.AuthenticationConverter
Converts an HTTP request to a
JwtAuthenticationRequest.
This class extracts the JWT from the Authorization header.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvert(jakarta.servlet.http.HttpServletRequest request) Converts the incomingHttpServletRequestto aJwtAuthenticationRequest.
-
Constructor Details
-
JwtAuthenticationConverter
public JwtAuthenticationConverter()
-
-
Method Details
-
convert
Converts the incomingHttpServletRequestto aJwtAuthenticationRequest.- Specified by:
convertin interfaceorg.springframework.security.web.authentication.AuthenticationConverter- Parameters:
request- The incoming request.- Returns:
- A
JwtAuthenticationRequestif a token is found, otherwise null.
-