Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Prathima Annamareddy
ParameterAutoLogin example
May 24, 2010 8:20 AM
Answer

Prathima Annamareddy

Rank: New Member

Posts: 9

Join Date: April 6, 2010

Recent Posts

Hi,

I am new to liferay and I would like to know how can I use ParameterAutoLogin.java. If I append parameterautologinlogin and parameterautologinpassword to the request url, will it call the ParameterAutologin.java and the user is logged in automatically?

I would be thankful if I get the responses quickly.

Regards,
Pratima
Sandeep Nair
RE: ParameterAutoLogin example
May 24, 2010 9:03 PM
Answer

Sandeep Nair

Rank: Liferay Legend

Posts: 1721

Join Date: November 5, 2008

Recent Posts

yes
Make sure your portal-ext.properties has this class specified in auto.login.hooks
1
2auto.login.hooks=com.liferay.portal.security.auth.CASAutoLogin,com.liferay.portal.security.auth.NtlmAutoLogin,com.liferay.portal.security.auth.OpenIdAutoLogin,com.liferay.portal.security.auth.OpenSSOAutoLogin,com.liferay.portal.security.auth.RememberMeAutoLogin,com.liferay.portal.security.auth.SiteMinderAutoLogin,com.liferay.portal.security.auth.ParameterAutoLogin


But it has to parameterAutoLoginLogin and parameterAutoLoginPassword
Its case sensitive.

Also plz check what is company.security.auth.type in your portal.properties, if its emailaddress you have to pass emailaddress as parameterAutoLoginLogin parameter, better u change it to screenname in the property and pass screenname instead

Regards,
Sandeep
Prathima Annamareddy
RE: ParameterAutoLogin example
May 25, 2010 5:56 AM
Answer

Prathima Annamareddy

Rank: New Member

Posts: 9

Join Date: April 6, 2010

Recent Posts

Thanks Sandeep,

However, the ParameterAutoLogin is not getting called. Below are the steps that I am doing.

1. I have mentioned the auto login hook property in portal-ext.properties


2. In my struts portlet on an action I prepare a URL with c/portal/login and append the parameters parameterAutoLoginLogin and parameterAutoLoginPassword and open a new window with this URL.

3. But my parameter auto login is not called.

could you please tell me where am I doing a mistake.?

Regards,
pratima
Sandeep Nair
RE: ParameterAutoLogin example
May 25, 2010 10:06 AM
Answer

Sandeep Nair

Rank: Liferay Legend

Posts: 1721

Join Date: November 5, 2008

Recent Posts

Hi,

It works fine for me.

I mentioned following in portal-ext.properties, note have added ParameterAutoLogin at the end

1auto.login.hooks=com.liferay.portal.security.auth.CASAutoLogin,com.liferay.portal.security.auth.NtlmAutoLogin,com.liferay.portal.security.auth.OpenIdAutoLogin,com.liferay.portal.security.auth.OpenSSOAutoLogin,com.liferay.portal.security.auth.RememberMeAutoLogin,com.liferay.portal.security.auth.SiteMinderAutoLogin,com.liferay.portal.security.auth.ParameterAutoLogin


Restarted the server and hit the following url

http://localhost:8080/web/guest?parameterAutoLoginLogin=test@liferay.com&parameterAutoLoginPassword=test

And i was logged in automatically.

Regards,
Sandeep
Zoheb Athar Siddiqui
RE: ParameterAutoLogin example
May 15, 2012 11:08 PM
Answer

Zoheb Athar Siddiqui

Rank: New Member

Posts: 24

Join Date: May 15, 2012

Recent Posts

Hi all,

Do wee need to add that ParameterAutoLogin hook in the servers portlet-ext properties only. i tried it but not auto loging.
can u just ellobrate more on it.

Regards,
Zoheb.S
Zoheb Athar Siddiqui
RE: ParameterAutoLogin example
May 16, 2012 5:51 AM
Answer

Zoheb Athar Siddiqui

Rank: New Member

Posts: 24

Join Date: May 15, 2012

Recent Posts

Hi,

it worked thanks...

Thanks and Regards,
Zoheb S
sandeep tripathi
RE: ParameterAutoLogin example
May 21, 2012 3:20 AM
Answer

sandeep tripathi

Rank: Regular Member

Posts: 100

Join Date: October 19, 2011

Recent Posts

Hi Sandeep,

i had tried ParameterAutoLogin for autologin into liferay , with your help i was able to login into liferay login i, but i need help in logout the user from liferay .
i am not show dockbar to our normal user so he cant click on signout link can we destroy session of user when we get parameter from external application into portal_normal like
this
#set ($logout = $request.getParameter("signout"))
#if($logout == "true")
calling logout action class
#end
Mohit Krishna
RE: ParameterAutoLogin example
January 23, 2013 2:44 AM
Answer

Mohit Krishna

Rank: New Member

Posts: 2

Join Date: December 18, 2012

Recent Posts

Sandeep Nair:
Hi,

It works fine for me.

I mentioned following in portal-ext.properties, note have added ParameterAutoLogin at the end

1auto.login.hooks=com.liferay.portal.security.auth.CASAutoLogin,com.liferay.portal.security.auth.NtlmAutoLogin,com.liferay.portal.security.auth.OpenIdAutoLogin,com.liferay.portal.security.auth.OpenSSOAutoLogin,com.liferay.portal.security.auth.RememberMeAutoLogin,com.liferay.portal.security.auth.SiteMinderAutoLogin,com.liferay.portal.security.auth.ParameterAutoLogin


Restarted the server and hit the following url

http://localhost:8080/web/guest?parameterAutoLoginLogin=test@liferay.com&parameterAutoLoginPassword=test

And i was logged in automatically.

Regards,
Sandeep



Hey Sandeep,
Thanks a ton. Have been looking for it for quite some time. Works amazingly. Though the user name and pass is exposed on the next screen. Can we mask the same??
Jorge Hortelano
RE: ParameterAutoLogin example
September 23, 2013 9:07 AM
Answer

Jorge Hortelano

Rank: New Member

Posts: 14

Join Date: September 10, 2013

Recent Posts

For people using Liferay 6.1.X
Read this thread:
AutoLogin not working in 6.1 GA2

Where recommend to put:
live.users.enabled=false
To avoid a bug.
Rajeev K
RE: ParameterAutoLogin example
November 22, 2013 4:04 AM
Answer

Rajeev K

Rank: Regular Member

Posts: 214

Join Date: June 18, 2009

Recent Posts

Hi,

Using 6.1.1 CE

I have default landing page /web/guest/home set for the portal.

Now I am using Parameter Auto login....I want to use a different landing page (web/guest/parampage) for this.

So basically have two landing pages..one for the normal user who signs in.....and one for the user who are signed in using parameter parameters.

How can this be done?