org.bbqjs.spring.security.web.authentication
Class HeaderBasedAuthenticationSuccessHandler
java.lang.Object
org.bbqjs.spring.security.web.authentication.HeaderBasedAuthenticationSuccessHandler
- All Implemented Interfaces:
- org.springframework.security.web.authentication.AuthenticationSuccessHandler
public class HeaderBasedAuthenticationSuccessHandler
- extends Object
- implements org.springframework.security.web.authentication.AuthenticationSuccessHandler
Sends a X-BBQ-ResponseType header with the value 1 and writes {result: true} into the output stream.
The header names and values and response JSON are overridable.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HeaderBasedAuthenticationSuccessHandler
public HeaderBasedAuthenticationSuccessHandler()
onAuthenticationSuccess
public void onAuthenticationSuccess(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.security.core.Authentication authentication)
throws IOException,
javax.servlet.ServletException
- Specified by:
onAuthenticationSuccess
in interface org.springframework.security.web.authentication.AuthenticationSuccessHandler
- Parameters:
request
- response
- authentication
-
- Throws:
IOException
javax.servlet.ServletException
setResponseTypeHeader
public void setResponseTypeHeader(String responseTypeHeader)
setResponseCode
public void setResponseCode(int responseCode)
setResponseMessageHeader
public void setResponseMessageHeader(String responseMessageHeader)
setResponseMessage
public void setResponseMessage(String responseMessage)
setResponseJSON
public void setResponseJSON(String responseJSON)
Copyright © 2012. All Rights Reserved.