Package io.meeds.oauth.web
Class OAuthAuthenticationFilter
java.lang.Object
org.exoplatform.container.web.AbstractFilter
org.gatein.sso.agent.filter.api.AbstractSSOInterceptor
io.meeds.oauth.web.OAuthAuthenticationFilter
- All Implemented Interfaces:
javax.servlet.Filter,org.gatein.sso.agent.filter.api.SSOInterceptor
public class OAuthAuthenticationFilter
extends org.gatein.sso.agent.filter.api.AbstractSSOInterceptor
This filter has already access to authenticated OAuth principal, so it's work
starts after successful OAuth authentication. Filter is useful only for
anonymous user Responsibility of this filter is to handle integration with
GateIn (Redirect to GateIn registration if needed, establish context and
redirect to JAAS to finish GateIn authentication etc)
- Author:
- Marek Posolda
-
Field Summary
Fields inherited from class org.gatein.sso.agent.filter.api.AbstractSSOInterceptor
PORTAL_CONTAINER_SUBSTITUTION_PATTERNFields inherited from class org.exoplatform.container.web.AbstractFilter
config, servletContextName -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcleanAuthenticationContext(javax.servlet.http.HttpServletRequest httpRequest) voiddestroy()voiddoFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain) protected StringgetLoginRedirectUrl(javax.servlet.http.HttpServletRequest req, String username) protected StringgetRegistrationRedirectURL(javax.servlet.http.HttpServletRequest req) protected voidhandleRedirectToPortalLogin(javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.http.HttpServletResponse httpResponse, org.exoplatform.services.organization.User portalUser, OAuthPrincipal principal) protected voidhandleRedirectToRegistrationForm(javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.http.HttpServletResponse httpResponse, OAuthPrincipal principal) protected voidinitImpl()protected voidprocessPrincipal(javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.http.HttpServletResponse httpResponse, OAuthPrincipal principal) Methods inherited from class org.gatein.sso.agent.filter.api.AbstractSSOInterceptor
afterInit, getExoContainer, getInitParameter, initWithParamsMethods inherited from class org.exoplatform.container.web.AbstractFilter
getContainer, getServletContext, init, requirePortalEnvironmentMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface javax.servlet.Filter
init
-
Constructor Details
-
OAuthAuthenticationFilter
public OAuthAuthenticationFilter()
-
-
Method Details
-
initImpl
protected void initImpl()- Specified by:
initImplin classorg.gatein.sso.agent.filter.api.AbstractSSOInterceptor
-
destroy
public void destroy() -
doFilter
public void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain) throws IOException, javax.servlet.ServletException - Throws:
IOExceptionjavax.servlet.ServletException
-
processPrincipal
protected void processPrincipal(javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.http.HttpServletResponse httpResponse, OAuthPrincipal principal) throws IOException - Throws:
IOException
-
handleRedirectToRegistrationForm
protected void handleRedirectToRegistrationForm(javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.http.HttpServletResponse httpResponse, OAuthPrincipal principal) throws IOException - Throws:
IOException
-
getRegistrationRedirectURL
-
handleRedirectToPortalLogin
protected void handleRedirectToPortalLogin(javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.http.HttpServletResponse httpResponse, org.exoplatform.services.organization.User portalUser, OAuthPrincipal principal) throws IOException - Throws:
IOException
-
getLoginRedirectUrl
-
cleanAuthenticationContext
protected void cleanAuthenticationContext(javax.servlet.http.HttpServletRequest httpRequest)
-