Class MetamaskSignInFilter
- java.lang.Object
-
- org.exoplatform.container.component.BaseComponentPlugin
-
- org.exoplatform.web.WebRequestHandler
-
- org.exoplatform.web.application.JspBasedWebHandler
-
- io.meeds.tenant.metamask.web.filter.MetamaskSignInFilter
-
- All Implemented Interfaces:
org.exoplatform.container.component.ComponentPlugin,org.exoplatform.web.filter.Filter
public class MetamaskSignInFilter extends org.exoplatform.web.application.JspBasedWebHandler implements org.exoplatform.web.filter.FilterA Login extension to submit Login parameters to UI for used network, contract adresses ...
-
-
Field Summary
Fields Modifier and Type Field Description static StringEMAIL_REQUEST_PARAMstatic StringERROR_CODE_PARAMstatic StringFULL_NAME_REQUEST_PARAMstatic org.exoplatform.services.log.LogLOGstatic StringMETAMASK_AUTHENTICATEDstatic StringMETAMASK_REGISTER_FORMstatic StringMETAMASK_REGISTER_USERstatic StringMETAMASK_SIGNED_MESSAGE_PREFIXstatic StringPASSWORD_REQUEST_PARAMstatic StringSEPARATORstatic StringUSERNAME_REQUEST_PARAM
-
Constructor Summary
Constructors Constructor Description MetamaskSignInFilter(org.exoplatform.container.PortalContainer container, org.exoplatform.web.WebAppController webAppController, org.exoplatform.services.resources.LocaleConfigService localeConfigService, org.exoplatform.portal.branding.BrandingService brandingService, org.exoplatform.web.application.javascript.JavascriptConfigService javascriptConfigService, org.exoplatform.portal.resource.SkinService skinService, MetamaskLoginService metamaskLoginService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddRegisterFormParams(org.json.JSONObject params, javax.servlet.http.HttpServletRequest request, String errorCode)voiddoFilter(javax.servlet.ServletRequest servletRequest, javax.servlet.ServletResponse servletResponse, javax.servlet.FilterChain chain)protected voidforwardUserRegistrationForm(org.exoplatform.web.ControllerContext controllerContext, String errorCode)protected StringgetCompoundPassword(javax.servlet.http.HttpServletRequest request)protected booleanprepareDispatch(org.exoplatform.web.ControllerContext controllerContext, String errorCode)protected javax.servlet.http.HttpServletRequestregisterUserAndWrapRequestForLogin(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)-
Methods inherited from class org.exoplatform.web.application.JspBasedWebHandler
execute, getHandlerName, getRequiresLifeCycle, prepareDispatch
-
-
-
-
Field Detail
-
LOG
public static final org.exoplatform.services.log.Log LOG
-
METAMASK_REGISTER_FORM
public static final String METAMASK_REGISTER_FORM
- See Also:
- Constant Field Values
-
EMAIL_REQUEST_PARAM
public static final String EMAIL_REQUEST_PARAM
- See Also:
- Constant Field Values
-
FULL_NAME_REQUEST_PARAM
public static final String FULL_NAME_REQUEST_PARAM
- See Also:
- Constant Field Values
-
ERROR_CODE_PARAM
public static final String ERROR_CODE_PARAM
- See Also:
- Constant Field Values
-
SEPARATOR
public static final String SEPARATOR
- See Also:
- Constant Field Values
-
METAMASK_AUTHENTICATED
public static final String METAMASK_AUTHENTICATED
- See Also:
- Constant Field Values
-
METAMASK_REGISTER_USER
public static final String METAMASK_REGISTER_USER
- See Also:
- Constant Field Values
-
USERNAME_REQUEST_PARAM
public static final String USERNAME_REQUEST_PARAM
- See Also:
- Constant Field Values
-
PASSWORD_REQUEST_PARAM
public static final String PASSWORD_REQUEST_PARAM
- See Also:
- Constant Field Values
-
METAMASK_SIGNED_MESSAGE_PREFIX
public static final String METAMASK_SIGNED_MESSAGE_PREFIX
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MetamaskSignInFilter
public MetamaskSignInFilter(org.exoplatform.container.PortalContainer container, org.exoplatform.web.WebAppController webAppController, org.exoplatform.services.resources.LocaleConfigService localeConfigService, org.exoplatform.portal.branding.BrandingService brandingService, org.exoplatform.web.application.javascript.JavascriptConfigService javascriptConfigService, org.exoplatform.portal.resource.SkinService skinService, MetamaskLoginService metamaskLoginService)
-
-
Method Detail
-
doFilter
public void doFilter(javax.servlet.ServletRequest servletRequest, javax.servlet.ServletResponse servletResponse, javax.servlet.FilterChain chain) throws IOException, javax.servlet.ServletException- Specified by:
doFilterin interfaceorg.exoplatform.web.filter.Filter- Throws:
IOExceptionjavax.servlet.ServletException
-
forwardUserRegistrationForm
protected void forwardUserRegistrationForm(org.exoplatform.web.ControllerContext controllerContext, String errorCode) throws Exception- Throws:
Exception
-
prepareDispatch
protected boolean prepareDispatch(org.exoplatform.web.ControllerContext controllerContext, String errorCode) throws Exception- Throws:
Exception
-
addRegisterFormParams
protected void addRegisterFormParams(org.json.JSONObject params, javax.servlet.http.HttpServletRequest request, String errorCode)
-
registerUserAndWrapRequestForLogin
protected javax.servlet.http.HttpServletRequest registerUserAndWrapRequestForLogin(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws Exception- Throws:
Exception
-
getCompoundPassword
protected String getCompoundPassword(javax.servlet.http.HttpServletRequest request)
-
-