public class SpnegoEntryPoint
extends java.lang.Object
implements org.springframework.security.web.AuthenticationEntryPoint
With optional configured forwardUrl
it is possible to use form
login as fallback authentication.
This approach enables security configuration to use SPNEGO in combination with login form as fallback for clients that do not support this kind of authentication. Set Response Code 401 - unauthorized and forward to login page. A useful scenario might be an environment where windows domain is present but it is required to access the application also from non domain client devices. One could use a combination with form based LDAP login.
See spnego-with-form-login.xml
in
spring-security-kerberos-sample for details
SpnegoAuthenticationProcessingFilter
Constructor and Description |
---|
SpnegoEntryPoint()
Instantiates a new spnego entry point.
|
SpnegoEntryPoint(java.lang.String forwardUrl)
Instantiates a new spnego entry point.
|
Modifier and Type | Method and Description |
---|---|
void |
commence(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
org.springframework.security.core.AuthenticationException ex) |
public SpnegoEntryPoint()
public SpnegoEntryPoint(java.lang.String forwardUrl)
forwardUrl
- URL where the login page can be found. Should be
relative to the web-app context path (include a leading
/
) and can't be absolute URL.public void commence(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.security.core.AuthenticationException ex) throws java.io.IOException, javax.servlet.ServletException
commence
in interface org.springframework.security.web.AuthenticationEntryPoint
java.io.IOException
javax.servlet.ServletException