Class ResponseHeaderSettingKerberosAuthenticationSuccessHandler
java.lang.Object
org.springframework.security.kerberos.web.authentication.ResponseHeaderSettingKerberosAuthenticationSuccessHandler
- All Implemented Interfaces:
AuthenticationSuccessHandler
public class ResponseHeaderSettingKerberosAuthenticationSuccessHandler
extends Object
implements AuthenticationSuccessHandler
Adds a WWW-Authenticate (or other) header to the response following successful
authentication.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidonAuthenticationSuccess(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Authentication authentication) Called when a user has been successfully authenticated.voidsetHeaderName(String headerName) Sets the name of the header to set.voidsetHeaderPrefix(String headerPrefix) Sets the value of the prefix for the encoded response token value.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.security.web.authentication.AuthenticationSuccessHandler
onAuthenticationSuccess
-
Constructor Details
-
ResponseHeaderSettingKerberosAuthenticationSuccessHandler
public ResponseHeaderSettingKerberosAuthenticationSuccessHandler()
-
-
Method Details
-
setHeaderName
Sets the name of the header to set. By default this is 'WWW-Authenticate'.- Parameters:
headerName- the www authenticate header name
-
setHeaderPrefix
Sets the value of the prefix for the encoded response token value. By default this is 'Negotiate '.- Parameters:
headerPrefix- the negotiate prefix
-
onAuthenticationSuccess
public void onAuthenticationSuccess(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Authentication authentication) throws IOException, jakarta.servlet.ServletException Description copied from interface:AuthenticationSuccessHandlerCalled when a user has been successfully authenticated.- Specified by:
onAuthenticationSuccessin interfaceAuthenticationSuccessHandler- Parameters:
request- the request which caused the successful authenticationresponse- the responseauthentication- the Authentication object which was created during the authentication process.- Throws:
IOExceptionjakarta.servlet.ServletException
-