Forums de discussion

Enabling captcha in login portlet

thumbnail
Vahid m, modifié il y a 13 années.

Enabling captcha in login portlet

Junior Member Publications: 26 Date d'inscription: 27/03/08 Publications récentes
Hi all,

Could anyone please tell me if it is possible to have a captcha on login page? I want all users to enter captcha text in addition to their username and password


Thanks
thumbnail
Juan Fernández, modifié il y a 13 années.

RE: Enabling captcha in login portlet

Liferay Legend Publications: 1261 Date d'inscription: 02/10/08 Publications récentes
Yeah, you just have to enable it in the portlet's configuration
Greetings
thumbnail
José Manuel Domínguez Romero, modifié il y a 13 années.

RE: Enabling captcha in login portlet

Regular Member Publications: 219 Date d'inscription: 03/02/10 Publications récentes
Hello Juan,

I'm very interested in this topic. I have followed your indication, but I don't see where to activate the captcha anywhere. I am using the 5.2.3 version of Liferay.

Can you help me, please?

Regards.
thumbnail
Vahid m, modifié il y a 13 années.

RE: Enabling captcha in login portlet

Junior Member Publications: 26 Date d'inscription: 27/03/08 Publications récentes
Hi Juan,

Thanks for answering. Could you be more specific?




I'm using Liferay 4.4. Is it available in that version as well or it is something that was added in later versions?
thumbnail
José Manuel Domínguez Romero, modifié il y a 13 années.

RE: Enabling captcha in login portlet

Regular Member Publications: 219 Date d'inscription: 03/02/10 Publications récentes
Hello,

I answer myself. I sure that isn't the best solution (I continue without finding like activate the captcha in login portlet), but it work for me, and also, perhaps for Vahid.

Well, I have extended the login portlet with the Ext Environment. I have modified the file login.jsp and I have added two lines:

<liferay-ui:error exception="<%= CaptchaTextException.class %>" message="text-verification-failed" />

<liferay-ui:captcha url="<%= captchaURL %>" />


That's all.

Thanks and regards.

(For Juan:
Hello Juan, I have just read your response. Thank you very much. It clarifies the doubts
that I had.)
thumbnail
Juan Fernández, modifié il y a 13 années.

RE: Enabling captcha in login portlet

Liferay Legend Publications: 1261 Date d'inscription: 02/10/08 Publications récentes
Hi guys:

sorry, I missread your post. I thought you were talking about having captcha in the create account part of the login portlet (which is available un LR 5.2.3), not the user + password + catcha login.

That is actually not implemented, but it would be easy to implement a plugin that extends the login's login.jsp file to add the captcha (you can use the captcha source code from create_account.jsp)

Regards
thumbnail
Dhandapani S, modifié il y a 13 années.

RE: Enabling captcha in login portlet

Regular Member Publications: 176 Date d'inscription: 24/03/09 Publications récentes
Hi Juan,

I have extended User Registration module through service builder in ext environment. Its working fine. The user got created successfully with captcha verification. After that I have added one finder method in service.xml. Again i deployed ext. It was giving some problem. So I have revert back to previous stage. After that registration is not working properly, its giving always text verification failed only if i give correct text which is coming in captcha image.

What is the issue here... Please help me out from this issue.

Thanks in advance.



Regards
Dhandapani.Semoticon
thumbnail
Juan Fernández, modifié il y a 13 années.

RE: Enabling captcha in login portlet

Liferay Legend Publications: 1261 Date d'inscription: 02/10/08 Publications récentes
Hi, Dhandapani.S:
to make it easier for the community to help you, could you

[indent]1.- Describe the steps you have done to develope this
2.- Tell us the classes you have created
3.- Describe the expected behaviour
4.- Copy the error logs and describe the unexpected behaviour you get
[/indent]

Thanks
Juan Fernández
Vlad Kuzmyk, modifié il y a 12 années.

RE: Enabling captcha in login portlet

New Member Publications: 10 Date d'inscription: 18/01/12 Publications récentes
Hi Juan,

I'm new to Liferay and need your advise.

I've created a hook to for a login portlet using this advise: http://lanbuithe.blogspot.com/2011/08/enabling-captcha-in-login-portlet.html

The Captcha is displayed now but verification is not processed.
I've created a java class, but I'm not sure if I put it in right place.

Basically, I have two questions:
1. Where should I put the java.class file
2. How should I reference it correctly/what xml ?

Thank you in advance
Ramesh Yelda, modifié il y a 8 années.

RE: Enabling captcha in login portlet

New Member Publications: 6 Date d'inscription: 30/12/15 Publications récentes
Plz reply to above query, i'm also facing the same kind of problem.
yang wang, modifié il y a 8 années.

RE: Enabling captcha in login portlet

Junior Member Publications: 80 Date d'inscription: 24/08/15 Publications récentes
For liferay 6.2(maybe 6.0+), beside the hook, you should write your custom login action class to override the system.


<!--?xml version="1.0"?-->


<hook>
	<portal-properties>portal.properties</portal-properties>
	<custom-jsp-dir>/custom_jsps</custom-jsp-dir>
	
	<struts-action>
        <struts-action-path>/login/login</struts-action-path>
        <struts-action-impl>com.liferay.sample.hook.MyCustomLoginAction</struts-action-impl>
    </struts-action>
</hook>


The attachment implements captcha login when fails more than 3 times(liferay 6.2 ce ga5). Hope it helps.
Ramesh Yelda, modifié il y a 8 années.

RE: Enabling captcha in login portlet

New Member Publications: 6 Date d'inscription: 30/12/15 Publications récentes
Thanks for ur quick reply