Class BasicAuthenticationConverter
java.lang.Object
org.springframework.security.web.authentication.www.BasicAuthenticationConverter
- All Implemented Interfaces:
AuthenticationConverter
Converts from a HttpServletRequest to
UsernamePasswordAuthenticationToken
that
can be authenticated. Null authentication possible if there was no Authorization header
with Basic authentication scheme.- Since:
- 5.2.0
-
Field Summary
-
Constructor Summary
ConstructorDescriptionBasicAuthenticationConverter
(AuthenticationDetailsSource<jakarta.servlet.http.HttpServletRequest, ?> authenticationDetailsSource) -
Method Summary
Modifier and TypeMethodDescriptionconvert
(jakarta.servlet.http.HttpServletRequest request) AuthenticationDetailsSource<jakarta.servlet.http.HttpServletRequest,
?> protected Charset
getCredentialsCharset
(jakarta.servlet.http.HttpServletRequest request) void
setAuthenticationDetailsSource
(AuthenticationDetailsSource<jakarta.servlet.http.HttpServletRequest, ?> authenticationDetailsSource) void
setCredentialsCharset
(Charset credentialsCharset)
-
Field Details
-
AUTHENTICATION_SCHEME_BASIC
- See Also:
-
-
Constructor Details
-
BasicAuthenticationConverter
public BasicAuthenticationConverter() -
BasicAuthenticationConverter
public BasicAuthenticationConverter(AuthenticationDetailsSource<jakarta.servlet.http.HttpServletRequest, ?> authenticationDetailsSource)
-
-
Method Details
-
getCredentialsCharset
-
setCredentialsCharset
-
getAuthenticationDetailsSource
public AuthenticationDetailsSource<jakarta.servlet.http.HttpServletRequest,?> getAuthenticationDetailsSource() -
setAuthenticationDetailsSource
public void setAuthenticationDetailsSource(AuthenticationDetailsSource<jakarta.servlet.http.HttpServletRequest, ?> authenticationDetailsSource) -
convert
- Specified by:
convert
in interfaceAuthenticationConverter
-
getCredentialsCharset
-