Class Pac4jEntryPoint

java.lang.Object
org.pac4j.core.engine.AbstractExceptionAwareLogic
org.pac4j.core.engine.DefaultSecurityLogic
org.pac4j.springframework.security.web.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
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    Pac4jEntryPoint(org.pac4j.core.config.Config config, String clientName)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    commence(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, org.springframework.security.core.AuthenticationException authException)
     

    Methods inherited from class org.pac4j.core.engine.DefaultSecurityLogic

    forbidden, getAuthorizationChecker, getClientFinder, getMatchingChecker, getSavedRequestHandler, isLoadProfilesFromSession, loadProfiles, perform, redirectToIdentityProvider, saveRequestedUrl, setAuthorizationChecker, setClientFinder, setLoadProfilesFromSession, setMatchingChecker, setSavedRequestHandler, startAuthentication, toString, unauthorized

    Methods inherited from class org.pac4j.core.engine.AbstractExceptionAwareLogic

    buildContext, getErrorUrl, handleException, runtimeException, setErrorUrl

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Pac4jEntryPoint

      public Pac4jEntryPoint()
    • Pac4jEntryPoint

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

    • commence

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