Package org.kuali.rice.krad.web.filter
Class UserLoginFilter
java.lang.Object
org.kuali.rice.krad.web.filter.UserLoginFilter
- All Implemented Interfaces:
javax.servlet.Filter
A filter for processing user logins and creating a
UserSession- Author:
- Kuali Rice Team (rice.collab@kuali.org)
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected org.kuali.rice.krad.UserSessioncreateUserSession(javax.servlet.http.HttpServletRequest request, String remoteUser) voiddestroy()protected voiddoFilter(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.FilterChain chain) voiddoFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain) protected voidestablishSessionCookie(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) Creates a session id cookie if one does not exists.protected voidestablishUserSession(javax.servlet.http.HttpServletRequest request) Checks if a user can be authenticated and if so establishes a UserSession for that user.protected StringextractRemoteUser(javax.servlet.http.HttpServletRequest request) protected org.kuali.rice.kim.api.identity.IdentityServiceprotected org.kuali.rice.core.api.config.property.ConfigurationServiceprotected StringgetKualiSessionId(javax.servlet.http.Cookie[] cookies) gets the kuali session id from an array of cookies.protected org.kuali.rice.coreservice.framework.parameter.ParameterServiceprotected org.kuali.rice.kim.api.permission.PermissionServicevoidinit(javax.servlet.FilterConfig config) protected booleanisAuthorizedToLogin(String principalId) checks if the passed in principalId is authorized to log in.protected booleanprotected booleanisRemoteUserSameAsUserSession(org.kuali.rice.krad.UserSession userSession, String remoteUser) protected voidlogDebugInfoAboutUser(String remoteUser, org.kuali.rice.krad.UserSession userSession) protected voidupdateUserSession(org.kuali.rice.krad.UserSession userSession, javax.servlet.http.HttpServletRequest request) Method to allow local overrides to update the userSession as necessary during each request.protected voidvalidatePrincipal(String remoteUser)
-
Constructor Details
-
UserLoginFilter
public UserLoginFilter()
-
-
Method Details
-
init
public void init(javax.servlet.FilterConfig config) throws javax.servlet.ServletException - Specified by:
initin interfacejavax.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:
doFilterin interfacejavax.servlet.Filter- Throws:
IOExceptionjavax.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:
IOExceptionjavax.servlet.ServletException
-
destroy
public void destroy()- Specified by:
destroyin interfacejavax.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, org.kuali.rice.krad.UserSession userSession) -
isRemoteUserSameAsUserSession
protected boolean isRemoteUserSameAsUserSession(org.kuali.rice.krad.UserSession userSession, String remoteUser) -
updateUserSession
protected void updateUserSession(org.kuali.rice.krad.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
-
isRemoteUserPrincpialId
protected boolean isRemoteUserPrincpialId() -
extractRemoteUser
-
createUserSession
protected org.kuali.rice.krad.UserSession createUserSession(javax.servlet.http.HttpServletRequest request, String remoteUser) -
isAuthorizedToLogin
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
gets the kuali session id from an array of cookies. If a session id does not exist returns null. -
getIdentityService
protected org.kuali.rice.kim.api.identity.IdentityService getIdentityService() -
getPermissionService
protected org.kuali.rice.kim.api.permission.PermissionService getPermissionService() -
getKualiConfigurationService
protected org.kuali.rice.core.api.config.property.ConfigurationService getKualiConfigurationService() -
getParameterService
protected org.kuali.rice.coreservice.framework.parameter.ParameterService getParameterService()
-