Package hudson.security
Class HudsonAuthenticationEntryPoint
- java.lang.Object
-
- hudson.security.HudsonAuthenticationEntryPoint
-
- All Implemented Interfaces:
org.springframework.security.web.AuthenticationEntryPoint
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public class HudsonAuthenticationEntryPoint extends Object implements org.springframework.security.web.AuthenticationEntryPoint
For anonymous requests to pages that require authentication, first respond withHttpServletResponse.SC_FORBIDDEN
, then redirect browsers automatically to the login page.This is a compromise to handle programmatic access and real browsers equally well.
The page that programs see is entirely white, and it auto-redirects, so humans wouldn't notice it.
- Author:
- Kohsuke Kawaguchi
-
-
Constructor Summary
Constructors Constructor Description HudsonAuthenticationEntryPoint(String loginFormUrl)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
commence(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse rsp, org.springframework.security.core.AuthenticationException reason)
-
-
-
Constructor Detail
-
HudsonAuthenticationEntryPoint
public HudsonAuthenticationEntryPoint(String loginFormUrl)
-
-
Method Detail
-
commence
public void commence(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse rsp, org.springframework.security.core.AuthenticationException reason) throws IOException, javax.servlet.ServletException
- Specified by:
commence
in interfaceorg.springframework.security.web.AuthenticationEntryPoint
- Throws:
IOException
javax.servlet.ServletException
-
-