Class 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 with HttpServletResponse.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 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 interface org.springframework.security.web.AuthenticationEntryPoint
        Throws:
        IOException
        javax.servlet.ServletException