Class TokenAuthenticationConverter
java.lang.Object
ai.yda.framework.channel.rest.spring.security.TokenAuthenticationConverter
- All Implemented Interfaces:
org.springframework.security.web.authentication.AuthenticationConverter
public class TokenAuthenticationConverter
extends Object
implements org.springframework.security.web.authentication.AuthenticationConverter
Provides strategy used for converting from a
HttpServletRequest to an TokenAuthentication. Used to
authenticate with TokenAuthenticationManager. If the result is null, then it signals that no authentication
attempt should be made.- Since:
- 0.1.0
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.security.core.Authenticationconvert(jakarta.servlet.http.HttpServletRequest request) Converts the givenHttpServletRequestto anTokenAuthentication.
-
Constructor Details
-
TokenAuthenticationConverter
public TokenAuthenticationConverter()Default constructor forTokenAuthenticationConverter.
-
-
Method Details
-
convert
public org.springframework.security.core.Authentication convert(jakarta.servlet.http.HttpServletRequest request) Converts the givenHttpServletRequestto anTokenAuthentication. If the result is null, then it signals that no authentication attempt should be made.- Specified by:
convertin interfaceorg.springframework.security.web.authentication.AuthenticationConverter- Parameters:
request- theHttpServletRequestto be converted.- Returns:
- the
Authenticationthat is a result of conversion or null if there is no authentication.
-