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 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 IdentityServiceprotected ConfigurationServiceprotected StringgetKualiSessionId(javax.servlet.http.Cookie[] cookies) gets the kuali session id from an array of cookies.protected ParameterServiceprotected PermissionServicevoidinit(javax.servlet.FilterConfig config) protected booleanisAuthorizedToLogin(String principalId) checks if the passed in principalId is authorized to log in.protected booleanprotected booleanisRemoteUserSameAsUserSession(UserSession userSession, String remoteUser) protected voidlogDebugInfoAboutUser(String remoteUser, UserSession userSession) protected voidupdateUserSession(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
-
isRemoteUserSameAsUserSession
-
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
-
isRemoteUserPrincpialId
protected boolean isRemoteUserPrincpialId() -
extractRemoteUser
-
createUserSession
protected 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
-
getPermissionService
-
getKualiConfigurationService
-
getParameterService
-