Class HttpStatusEntryPoint
java.lang.Object
org.springframework.security.web.authentication.HttpStatusEntryPoint
- All Implemented Interfaces:
- AuthenticationEntryPoint
An 
AuthenticationEntryPoint that sends a generic HttpStatus as a
 response. Useful for JavaScript clients which cannot use Basic authentication since the
 browser intercepts the response.- Since:
- 4.0
- 
Constructor SummaryConstructorsConstructorDescriptionHttpStatusEntryPoint(org.springframework.http.HttpStatus httpStatus) Creates a new instance.
- 
Method SummaryModifier and TypeMethodDescriptionvoidcommence(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, AuthenticationException authException) Commences an authentication scheme.
- 
Constructor Details- 
HttpStatusEntryPointpublic HttpStatusEntryPoint(org.springframework.http.HttpStatus httpStatus) Creates a new instance.- Parameters:
- httpStatus- the HttpStatus to set
 
 
- 
- 
Method Details- 
commencepublic void commence(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, AuthenticationException authException) Description copied from interface:AuthenticationEntryPointCommences an authentication scheme.ExceptionTranslationFilterwill populate theHttpSessionattribute namedAbstractAuthenticationProcessingFilter.SPRING_SECURITY_SAVED_REQUEST_KEYwith the requested target URL before calling this method.Implementations should modify the headers on the ServletResponseas necessary to commence the authentication process.- Specified by:
- commencein interface- AuthenticationEntryPoint
- Parameters:
- request- that resulted in an- AuthenticationException
- response- so that the user agent can begin authentication
- authException- that caused the invocation
 
 
-