Class UserLoginFilter

java.lang.Object
org.kuali.rice.krad.web.filter.UserLoginFilter
All Implemented Interfaces:
javax.servlet.Filter

public class UserLoginFilter extends Object implements javax.servlet.Filter
A filter for processing user logins and creating a UserSession
Author:
Kuali Rice Team (rice.collab@kuali.org)
See Also:
  • Constructor Details

    • UserLoginFilter

      public UserLoginFilter()
  • Method Details

    • init

      public void init(javax.servlet.FilterConfig config) throws javax.servlet.ServletException
      Specified by:
      init in interface javax.servlet.Filter
      Throws:
      javax.servlet.ServletException
    • doFilter

      public void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain) throws IOException, javax.servlet.ServletException
      Specified by:
      doFilter in interface javax.servlet.Filter
      Throws:
      IOException
      javax.servlet.ServletException
    • doFilter

      protected void doFilter(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.FilterChain chain) throws IOException, javax.servlet.ServletException
      Throws:
      IOException
      javax.servlet.ServletException
    • destroy

      public void destroy()
      Specified by:
      destroy in interface javax.servlet.Filter
    • establishUserSession

      protected void establishUserSession(javax.servlet.http.HttpServletRequest request)
      Checks if a user can be authenticated and if so establishes a UserSession for that user.
    • logDebugInfoAboutUser

      protected void logDebugInfoAboutUser(String remoteUser, UserSession userSession)
    • isRemoteUserSameAsUserSession

      protected boolean isRemoteUserSameAsUserSession(UserSession userSession, String remoteUser)
    • updateUserSession

      protected void updateUserSession(UserSession userSession, javax.servlet.http.HttpServletRequest request)
      Method to allow local overrides to update the userSession as necessary during each request. Defaults to a noop.
    • validatePrincipal

      protected void validatePrincipal(String remoteUser)
    • isRemoteUserPrincpialId

      protected boolean isRemoteUserPrincpialId()
    • extractRemoteUser

      protected String extractRemoteUser(javax.servlet.http.HttpServletRequest request)
    • createUserSession

      protected UserSession createUserSession(javax.servlet.http.HttpServletRequest request, String remoteUser)
    • isAuthorizedToLogin

      protected boolean isAuthorizedToLogin(String principalId)
      checks if the passed in principalId is authorized to log in.
    • establishSessionCookie

      protected void establishSessionCookie(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
      Creates a session id cookie if one does not exists. Write the cookie out to the response with that session id. Also, sets the cookie on the established user session.
    • getKualiSessionId

      protected String getKualiSessionId(javax.servlet.http.Cookie[] cookies)
      gets the kuali session id from an array of cookies. If a session id does not exist returns null.
    • getIdentityService

      protected IdentityService getIdentityService()
    • getPermissionService

      protected PermissionService getPermissionService()
    • getKualiConfigurationService

      protected ConfigurationService getKualiConfigurationService()
    • getParameterService

      protected ParameterService getParameterService()