Foros de discusión

Enabling captcha in login portlet

thumbnail
Vahid m, modificado hace 13 años.

Enabling captcha in login portlet

Junior Member Mensajes: 26 Fecha de incorporación: 27/03/08 Mensajes recientes
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, modificado hace 13 años.

RE: Enabling captcha in login portlet

Liferay Legend Mensajes: 1261 Fecha de incorporación: 2/10/08 Mensajes recientes
Yeah, you just have to enable it in the portlet's configuration
Greetings
thumbnail
José Manuel Domínguez Romero, modificado hace 13 años.

RE: Enabling captcha in login portlet

Regular Member Mensajes: 219 Fecha de incorporación: 3/02/10 Mensajes recientes
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, modificado hace 13 años.

RE: Enabling captcha in login portlet

Junior Member Mensajes: 26 Fecha de incorporación: 27/03/08 Mensajes recientes
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, modificado hace 13 años.

RE: Enabling captcha in login portlet

Regular Member Mensajes: 219 Fecha de incorporación: 3/02/10 Mensajes recientes
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, modificado hace 13 años.

RE: Enabling captcha in login portlet

Liferay Legend Mensajes: 1261 Fecha de incorporación: 2/10/08 Mensajes recientes
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, modificado hace 13 años.

RE: Enabling captcha in login portlet

Regular Member Mensajes: 176 Fecha de incorporación: 24/03/09 Mensajes recientes
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, modificado hace 13 años.

RE: Enabling captcha in login portlet

Liferay Legend Mensajes: 1261 Fecha de incorporación: 2/10/08 Mensajes recientes
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, modificado hace 12 años.

RE: Enabling captcha in login portlet

New Member Mensajes: 10 Fecha de incorporación: 18/01/12 Mensajes recientes
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, modificado hace 8 años.

RE: Enabling captcha in login portlet

New Member Mensajes: 6 Fecha de incorporación: 30/12/15 Mensajes recientes
Plz reply to above query, i'm also facing the same kind of problem.
yang wang, modificado hace 8 años.

RE: Enabling captcha in login portlet

Junior Member Mensajes: 80 Fecha de incorporación: 24/08/15 Mensajes recientes
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.

Archivos adjuntos:

Ramesh Yelda, modificado hace 8 años.

RE: Enabling captcha in login portlet

New Member Mensajes: 6 Fecha de incorporación: 30/12/15 Mensajes recientes
Thanks for ur quick reply