Class Pac4jEntryPoint

  • All Implemented Interfaces:
    org.pac4j.core.engine.SecurityLogic, org.springframework.security.web.AuthenticationEntryPoint

    public class Pac4jEntryPoint
    extends org.pac4j.core.engine.DefaultSecurityLogic
    implements org.springframework.security.web.AuthenticationEntryPoint
    This entry point can be defined with a security configuration and a client name: if it's an indirect client, it redirects the user to te identity provider for login. Otherwise, a 401 error page is returned. If no configuration is provided, an error is returned directly.
    Since:
    1.0.0
    Author:
    Jerome Leleu
    • Field Summary

      • Fields inherited from class org.pac4j.core.engine.DefaultSecurityLogic

        INSTANCE
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void commence​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, org.springframework.security.core.AuthenticationException authException)  
      String getClientName()  
      org.pac4j.core.config.Config getConfig()  
      void setClientName​(String clientName)  
      void setConfig​(org.pac4j.core.config.Config config)  
      String toString()  
      • Methods inherited from class org.pac4j.core.engine.DefaultSecurityLogic

        forbidden, getAuthorizationChecker, getClientFinder, getMatchingChecker, getSavedRequestHandler, loadProfiles, perform, redirectToIdentityProvider, saveRequestedUrl, setAuthorizationChecker, setClientFinder, setMatchingChecker, setSavedRequestHandler, startAuthentication, unauthorized
      • Methods inherited from class org.pac4j.core.engine.AbstractExceptionAwareLogic

        getErrorUrl, handleException, runtimeException, setErrorUrl
      • Methods inherited from class org.pac4j.core.profile.factory.ProfileManagerFactoryAware

        getProfileManager, getProfileManagerFactory, setProfileManagerFactory
    • Constructor Detail

      • Pac4jEntryPoint

        public Pac4jEntryPoint()
      • Pac4jEntryPoint

        public Pac4jEntryPoint​(org.pac4j.core.config.Config config,
                               String clientName)
    • Method Detail

      • commence

        public void commence​(javax.servlet.http.HttpServletRequest request,
                             javax.servlet.http.HttpServletResponse response,
                             org.springframework.security.core.AuthenticationException authException)
                      throws IOException,
                             javax.servlet.ServletException
        Specified by:
        commence in interface org.springframework.security.web.AuthenticationEntryPoint
        Throws:
        IOException
        javax.servlet.ServletException
      • getConfig

        public org.pac4j.core.config.Config getConfig()
      • setConfig

        public void setConfig​(org.pac4j.core.config.Config config)
      • getClientName

        public String getClientName()
      • setClientName

        public void setClientName​(String clientName)
      • toString

        public String toString()
        Overrides:
        toString in class org.pac4j.core.engine.DefaultSecurityLogic