Forums

Home » Liferay Portal » English » 2. Using Liferay » General

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Vahid M
Enabling captcha in login portlet
May 28, 2010 4:07 AM
Answer

Vahid M

Rank: Junior Member

Posts: 26

Join Date: March 27, 2008

Recent Posts

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
Juan Fernández
RE: Enabling captcha in login portlet
May 25, 2010 12:40 AM
Answer

Juan Fernández

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1262

Join Date: October 2, 2008

Recent Posts

Yeah, you just have to enable it in the portlet's configuration
Greetings
José Manuel Domínguez Romero
RE: Enabling captcha in login portlet
May 25, 2010 1:14 AM
Answer

José Manuel Domínguez Romero

Rank: Regular Member

Posts: 219

Join Date: February 3, 2010

Recent Posts

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.
Vahid M
RE: Enabling captcha in login portlet
May 25, 2010 12:20 PM
Answer

Vahid M

Rank: Junior Member

Posts: 26

Join Date: March 27, 2008

Recent Posts

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?
José Manuel Domínguez Romero
RE: Enabling captcha in login portlet
May 26, 2010 1:38 AM
Answer

José Manuel Domínguez Romero

Rank: Regular Member

Posts: 219

Join Date: February 3, 2010

Recent Posts

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:

1<liferay-ui:error exception="<%= CaptchaTextException.class %>" message="text-verification-failed" />
2
3<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.)
Juan Fernández
RE: Enabling captcha in login portlet
May 26, 2010 12:23 AM
Answer

Juan Fernández

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1262

Join Date: October 2, 2008

Recent Posts

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
Dhandapani S
RE: Enabling captcha in login portlet
June 11, 2010 12:38 AM
Answer

Dhandapani S

Rank: Regular Member

Posts: 170

Join Date: March 24, 2009

Recent Posts

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
Juan Fernández
RE: Enabling captcha in login portlet
June 11, 2010 3:14 AM
Answer

Juan Fernández

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1262

Join Date: October 2, 2008

Recent Posts

Hi, Dhandapani.S:
to make it easier for the community to help you, could you

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


Thanks
Juan Fernández
Vlad Kuzmyk
RE: Enabling captcha in login portlet
March 26, 2012 9:26 AM
Answer

Vlad Kuzmyk

Rank: New Member

Posts: 10

Join Date: January 18, 2012

Recent Posts

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
RE: Enabling captcha in login portlet
January 4, 2016 2:50 AM
Answer

Ramesh Yelda

Rank: New Member

Posts: 6

Join Date: December 30, 2015

Recent Posts

Plz reply to above query, i'm also facing the same kind of problem.
yang wang
RE: Enabling captcha in login portlet
January 6, 2016 4:48 PM
Answer

yang wang

Rank: New Member

Posts: 20

Join Date: August 24, 2015

Recent Posts

For liferay 6.2(maybe 6.0+), beside the hook, you should write your custom login action class to override the system.

 1
 2<?xml version="1.0"?>
 3<!DOCTYPE hook PUBLIC "-//Liferay//DTD Hook 6.2.0//EN" "http://www.liferay.com/dtd/liferay-hook_6_2_0.dtd">
 4
 5<hook>
 6    <portal-properties>portal.properties</portal-properties>
 7    <custom-jsp-dir>/custom_jsps</custom-jsp-dir>
 8   
 9    <struts-action>
10        <struts-action-path>/login/login</struts-action-path>
11        <struts-action-impl>com.liferay.sample.hook.MyCustomLoginAction</struts-action-impl>
12    </struts-action>
13</hook>


The attachment implements captcha login when fails more than 3 times(liferay 6.2 ce ga5). Hope it helps.
Attachments: FirstHook-hook.zip (17.0k)
Ramesh Yelda
RE: Enabling captcha in login portlet
January 7, 2016 1:03 AM
Answer

Ramesh Yelda

Rank: New Member

Posts: 6

Join Date: December 30, 2015

Recent Posts

Thanks for ur quick reply