siavvasm / github-login-hook

A plugin (in particular a hook) for the Liferay Portal that allows users to register and log in to a Liferay Portal instance with their Github account.
GNU General Public License v3.0
1 stars 3 forks source link

Liferay 7 version #1

Open vernaillen opened 8 years ago

vernaillen commented 8 years ago

Hi Miltiadis, Great work with this Liferay hook! Have you tried to port it to Liferay 7 yet? I could use this on Liferay 7, so if you didn't port that yet, then I'll give it a try. Cheers, Wouter

siavvasm commented 8 years ago

Hello Wouter,

Thank you very much for your good words.

I have tried to make the plugin work on the Liferay 7 Portal by modifying its source code so that it is compatible with the Liferay 7 platform. I have uploaded a branch named "liferay_7" containing the modified source code of the hook so that you can have a look at it if you wish.

The plugin works successfully on Liferay 7, except for its GUI. In particular, if you download the source code, export it as a .war file through Eclipse and then deploy it on a Liferay Portal 7 instance, it will be successfully deployed. However, when you click on the "Sign In" option found on the home page of the portal, you will not find the github icon that allows you to use the hook. If you check the terminal you will see the following message:

    "Unable to find /navigation/github.jsp in the context /o/comliferayloginweb"

However, if you type manually the following URL:

    localhost:8080/c/portal/github_login?cmd=login

the login process is executed and the user is successfully logged in.

The github.jsp is responsible for opening a new window and typing the aforementioned URL, whenever the github icon of the Sign In portlet is clicked.

From the plugin's behavior described above, I suppose that Liferay cannot access the jsp files that I have placed inside the custom_jsps folder. After a quick google search I found out that Liferay changed the way it manipulates the jsp files in its new version.

I was planning to fix this issue as soon as possible, but this period I was really busy with other commitments, and therefore I postponed this task for the future. If you are interested in helping me with this issue, I would be really grateful.

You can clone the source code found under the "liferay_7" branch so that you can work on it. I would suggest you to make a pull request so that we can monitor the issue more efficiently and embed the changes quickly, when the issue is eventually resolved.

Cheers, Miltiadis

vernaillen commented 8 years ago

Hi Miltiadis,

Liferay has indeed changed the way they're handling jsp's, war files, etc.

I think it's best for Liferay 7 to convert the hook into an OSGi module, based on the blade.autologin sample. An OSGi module is also structured differently, for example it's not using the docroot folder any more, but a src folder, and IMHO it's best to use gradle or maven like shown in the blade samples as well.

I forked the repo and I will give it a try to convert to an OSGi module.

Cheers, Wouter

siavvasm commented 8 years ago

Hi Wouter,

I agree with you. Give it a try and let me know whenever you have any updates on this issue.

Thank you again.

Cheers, Miltiadis