Feature #3974

Create a portlet where users can declare their additional e-mail addresses

Added by Panagiota Koltsida over 2 years ago. Updated about 2 years ago.

Status:ClosedStart date:May 10, 2016
Priority:NormalDue date:
Assignee:Michalis Nikolopoulos% Done:

100%

Category:portlets-user
Sprint:Liferay migration to 6.2 Version
Milestones:
Duration:

Description

A new portlet should be developed and placed under the profile page
Using this portlet a user can add additional e-mail addresses which will be used when authenticating him.


Related issues

Related to gCube - Feature #2031: Provide a Social login portlet for liferay Closed Jan 21, 2016 Mar 31, 2016
Related to BlueBRIDGE - Project WP #686: WP9 - VRE Commons Development [Months: 1-30] Closed Oct 15, 2015 Jan 18, 2018
Related to gCube - Feature #3972: Allow users to login to portal with different e-mail addr... Closed May 10, 2016

History

#1 Updated by Panagiota Koltsida over 2 years ago

  • Related to Feature #2031: Provide a Social login portlet for liferay added

#2 Updated by Panagiota Koltsida over 2 years ago

  • Related to Project WP #686: WP9 - VRE Commons Development [Months: 1-30] added

#3 Updated by Panagiota Koltsida over 2 years ago

  • Related to Feature #3972: Allow users to login to portal with different e-mail addresses under the same account added

#4 Updated by Massimiliano Assante over 2 years ago

  • Priority changed from Normal to High

when do you plan to release such portlet?

#5 Updated by Michalis Nikolopoulos over 2 years ago

Hi @massimiliano.assante@isti.cnr.it, I have completed the development of Additional Email Addresses Component. In order for this portlet to work it requires a hook as well. After you have deployed both .war you could add an email address. When this e-mail address is verified the user can use a social login that contains this e-mail address to login. All social logins has been altered to support the additional e-mail addresses component. I was not able to test the e-mail service that you provided me with, so we might have issues. Moreover, i list you the components that need to be tested. I am awaiting your feedback.

Additional Email Addresses:
AdditionalEmailAddressesHook:http://maven.research-infrastructures.eu/nexus/service/local/repositories/gcube-snapshots/content/gr/cite/additionalemailaddresses/additionalEmailAddressesHook/1.0.0-SNAPSHOT/additionalEmailAddressesHook-1.0.0-20160729.131857-1.war
AdditionalEmailAddressesPortlet:http://maven.research-infrastructures.eu/nexus/service/local/repositories/gcube-snapshots/content/gr/cite/additionalemailaddresses/AdditionalEmailAddressesPortlet/1.0.0-SNAPSHOT/AdditionalEmailAddressesPortlet-1.0.0-20160729.130931-1.war
google-hook-login:http://maven.research-infrastructures.eu/nexus/service/local/repositories/gcube-snapshots/content/gr/cite/google/Google-login-hook/1.0.0-SNAPSHOT/Google-login-hook-1.0.0-20160729.133002-13.war
linkedin-hook-login:http://maven.research-infrastructures.eu/nexus/service/local/repositories/gcube-snapshots/content/gr/cite/linkedin/linkedin-hook-login/1.0.0-SNAPSHOT/linkedin-hook-login-1.0.0-20160729.135449-5.war
microsoft-hook-login:http://maven.research-infrastructures.eu/nexus/service/local/repositories/gcube-snapshots/content/gr/cite/microsoft/microsoft-hook-login/1.0.0-SNAPSHOT/microsoft-hook-login-1.0.0-20160729.135637-5.war

#6 Updated by Pasquale Pagano over 2 years ago

  • Priority changed from High to Normal

Massimiliano in on vacation now and he will be back on August 23rd. This activity will have to restart then.

#7 Updated by Panagiota Koltsida over 2 years ago

  • % Done changed from 0 to 90
  • Status changed from New to In Progress

#8 Updated by Massimiliano Assante about 2 years ago

Thanks Michalis,
Unfortunately I tried to deploy the war AdditionalEmailAddressesPortlet-1.0.0-20160729.130931-1.war but got deploy exception below:

INFO: No Spring WebApplicationInitializer types detected on classpath
12:37:04,752 INFO  [localhost-startStop-2][HotDeployEvent:145] Plugin AdditionalEmailAddressesPortlet-1.0.0-20160729 requires marketplace-portlet
12:37:04,752 INFO  [localhost-startStop-2][HotDeployImpl:217] Deploying AdditionalEmailAddressesPortlet-1.0.0-20160729 from queue
12:37:04,754 INFO  [localhost-startStop-2][PluginPackageUtil:1016] Reading plugin package for AdditionalEmailAddressesPortlet-1.0.0-20160729
12:37:04,754 WARN  [localhost-startStop-2][PluginPackageUtil:1114] Plugin package on context AdditionalEmailAddressesPortlet-1.0.0-20160729 cannot be tracked because this WAR does not contain a liferay-plugin-package.xml file
Loading file:/home/life/Portal-Bundle/tomcat-7.0.62/temp/54-AdditionalEmailAddressesPortlet-1.0.0-20160729/WEB-INF/classes/portlet.properties
Loading file:/home/life/Portal-Bundle/tomcat-7.0.62/temp/54-AdditionalEmailAddressesPortlet-1.0.0-20160729/WEB-INF/classes/portlet.properties
Aug 23, 2016 12:37:05 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
12:37:05,094 INFO  [localhost-startStop-2][PortletHotDeployListener:344] Registering portlets for AdditionalEmailAddressesPortlet-1.0.0-20160729
[PORTAL] 0    [localhost-startStop-2] INFO  org.springframework.web.portlet.DispatcherPortlet  - Initializing portlet 'AdditionalEmailAddressesPortlet'
[PORTAL] 85   [localhost-startStop-2] INFO  org.springframework.web.portlet.DispatcherPortlet  - FrameworkPortlet 'AdditionalEmailAddressesPortlet': initialization started
[PORTAL] 110  [localhost-startStop-2] INFO  org.springframework.web.portlet.context.XmlPortletApplicationContext  - Refreshing PortletApplicationContext for namespace 'AdditionalEmailAddressesPortlet-portlet': startup date [Tue Aug 23 12:37:05 GMT 2016]; root of context hierarchy
[PORTAL] 181  [localhost-startStop-2] INFO  org.springframework.beans.factory.xml.XmlBeanDefinitionReader  - Loading XML bean definitions from PortletContext resource [/WEB-INF/AdditionalEmailAddressesPortlet-portlet.xml]

...

[PORTAL] 642  [localhost-startStop-2] ERROR org.springframework.web.portlet.DispatcherPortlet  - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.validation.beanvalidation.LocalValidatorFactoryBean#0': Invocation of init method failed; nested exception is javax.validation.ValidationException: Unable to create a Configuration, because no Bean Validation provider could be found. Add a provider like Hibernate Validator (RI) to your classpath.
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1512)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:296)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:293)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:628)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
    at org.springframework.web.portlet.FrameworkPortlet.createPortletApplicationContext(FrameworkPortlet.java:357)
    at org.springframework.web.portlet.FrameworkPortlet.initPortletApplicationContext(FrameworkPortlet.java:294)
    at org.springframework.web.portlet.FrameworkPortlet.initPortletBean(FrameworkPortlet.java:268)
    at org.springframework.web.portlet.GenericPortletBean.init(GenericPortletBean.java:124)
    at javax.portlet.GenericPortlet.init(GenericPortlet.java:136)
    at com.liferay.portlet.InvokerPortletImpl.init(InvokerPortletImpl.java:269)
    at com.liferay.portlet.PortletInstanceFactoryImpl.init(PortletInstanceFactoryImpl.java:228)
    at com.liferay.portlet.PortletInstanceFactoryImpl.create(PortletInstanceFactoryImpl.java:145)
    at com.liferay.portlet.PortletInstanceFactoryUtil.create(PortletInstanceFactoryUtil.java:41)
    at com.liferay.portlet.PortletBagFactory.create(PortletBagFactory.java:337)
    at com.liferay.portal.deploy.hot.PortletHotDeployListener.doInvokeDeploy(PortletHotDeployListener.java:370)
    at com.liferay.portal.deploy.hot.PortletHotDeployListener.invokeDeploy(PortletHotDeployListener.java:125)
    at com.liferay.portal.deploy.hot.HotDeployImpl.doFireDeployEvent(HotDeployImpl.java:230)
    at com.liferay.portal.deploy.hot.HotDeployImpl.fireDeployEvent(HotDeployImpl.java:96)
    at com.liferay.portal.kernel.deploy.hot.HotDeployUtil.fireDeployEvent(HotDeployUtil.java:28)
    at com.liferay.portal.kernel.servlet.PluginContextListener.fireDeployEvent(PluginContextListener.java:164)
    at com.liferay.portal.kernel.servlet.PluginContextListener.doPortalInit(PluginContextListener.java:154)
    at com.liferay.portal.kernel.util.BasePortalLifecycle.portalInit(BasePortalLifecycle.java:44)
    at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.java:74)
    at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.java:58)
    at com.liferay.portal.kernel.util.BasePortalLifecycle.registerPortalLifecycle(BasePortalLifecycle.java:54)
    at com.liferay.portal.kernel.servlet.PluginContextListener.contextInitialized(PluginContextListener.java:116)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5016)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5528)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
    at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
    at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
    at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1263)
    at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1948)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)
Caused by: javax.validation.ValidationException: Unable to create a Configuration, because no Bean Validation provider could be found. Add a provider like Hibernate Validator (RI) to your classpath.
    at javax.validation.Validation$GenericBootstrapImpl.configure(Validation.java:271)
    at org.springframework.validation.beanvalidation.LocalValidatorFactoryBean.afterPropertiesSet(LocalValidatorFactoryBean.java:188)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1571)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1509)
    ... 44 more
12:37:05,798 ERROR [localhost-startStop-2][PortletBagFactory:340] org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.validation.beanvalidation.LocalValidatorFactoryBean#0': Invocation of init method failed; nested exception is javax.validation.ValidationException: Unable to create a Configuration, because no Bean Validation provider could be found. Add a provider like Hibernate Validator (RI) to your classpath.

#9 Updated by Michalis Nikolopoulos about 2 years ago

Hi @massimiliano.assante@isti.cnr.it, i have reuploaded both AdditionalEmailAddresses hook and portlet as well as the social login hooks with certain fixes. Moroever you should deploy the additionalEmailAddresses hook before you deploy the portlet. Lastly i had to add in my dependencies the hibernate-validator, something that is not necessary with vanilla liferay. I await your feedback, have a nice day.

Lastly here is a list with the components:

AdditionalEmailAddressesHook:http://maven.research-infrastructures.eu/nexus/service/local/repositories/gcube-snapshots/content/gr/cite/additionalemailaddresses/AdditionalEmailAddresses-hook/1.0.0-SNAPSHOT/AdditionalEmailAddresses-hook-1.0.0-20160823.155007-2.war
AdditionalEmailAddressesPortlet:http://maven.research-infrastructures.eu/nexus/service/local/repositories/gcube-snapshots/content/gr/cite/additionalemailaddresses/AdditionalEmailAddresses-portlet/1.0.0-SNAPSHOT/AdditionalEmailAddresses-portlet-1.0.0-20160823.155052-2.war
google-hook-login:http://maven.research-infrastructures.eu/nexus/service/local/repositories/gcube-snapshots/content/gr/cite/google/Google-login-hook/1.0.0-SNAPSHOT/Google-login-hook-1.0.0-20160823.154728-14.war
linkedin-hook-login:http://maven.research-infrastructures.eu/nexus/service/local/repositories/gcube-snapshots/content/gr/cite/linkedin/linkedin-hook-login/1.0.0-SNAPSHOT/linkedin-hook-login-1.0.0-20160823.154816-6.war
microsoft-hook-login:http://maven.research-infrastructures.eu/nexus/service/local/repositories/gcube-snapshots/content/gr/cite/microsoft/microsoft-hook-login/1.0.0-SNAPSHOT/microsoft-hook-login-1.0.0-20160823.154914-6.war

#10 Updated by Massimiliano Assante about 2 years ago

Hi Michalis, thanks for your quick reply. I was able to deploy both AdditionalEmailAddressesHook and Portlet. And I was able to use the portlet so that I received the email to verify my account.

In particular to test the application I linked the email d4science at d4science.org (LinkedIn) to mine correctly, but when I try to login via LinkedIn to the gateway after LinkedIn authenticates I get redirected to the login page (logged out status) and the catalina reports the following:

anager  - Found match! Your site is gCube Snapshots Gateway
2016-08-24 10:20:16,246 DEBUG landingpage.LandingPageManager [http-bio-9090-exec-31,getLandingPagePath:71] %[PORTAL] 442749 [http-bio-9090-exec-31] DEBUG org.gcube.portal.landingpage.LandingPageManager  - user Massimiliano Assante is registered to gCube Snapshots Gateway. redirecting ...
10:20:16,270 ERROR [http-bio-9090-exec-46][AutoLoginFilter:262] Current URL /group/next generates exception: com.liferay.portal.NoSuchUserException: No User exists with the key {companyId=20154, emailAddress=d4science@d4science.org}

Also, the text of the email you send should be slightly modified as follows:

Dear Massimiliano,

please click on the link below  to verify your additional e-mail address ******@domain.com

https://next.d4science.org/c/portal/email_addresses/verify_email?code=83db54b3-98cf-438e-88db-07ccb432af22

#12 Updated by Massimiliano Assante about 2 years ago

  • % Done changed from 90 to 100

Works now!

#13 Updated by Massimiliano Assante about 2 years ago

  • Status changed from In Progress to Closed

Also available in: Atom PDF