Fórum

Help with SSO

Anamica Liferay, modificado 1 Ano atrás.

Help with SSO

Junior Member Postagens: 39 Data de Entrada: 07/10/09 Postagens Recentes
Here is my doubt..

We have a web application running in weblogic..

We have portal in liferay..

We need a SSO solution. The deadline is short hence integrating with CAS or anything similar is out of the question for the moment.. emoticon (Why am I not surprised!!!! :grinemoticon

That said.. How do I login from my web application to liferay? Is there any class that I can call or extend or whatever and directly validate the user and redirect him to the home page?

I can pass any info needed like username/password or any thing needed from my web application to this liferay class!!!

Thanks in advance emoticon
thumbnail
Shagul Khaja, modificado 14 Anos atrás.

RE: Help with SSO

Liferay Master Postagens: 758 Data de Entrada: 27/09/07 Postagens Recentes
Hi,

You may want to look into the below property and the classes that are listed. Liferay provides a AutoLogin interface that you could implement to provide your own SSO solution.


##
## Auto Login
##

    #
    # Input a list of comma delimited class names that implement
    # com.liferay.portal.security.auth.AutoLogin. These classes will run in
    # consecutive order for all unauthenticated users until one of them return a
    # valid user id and password combination. If no valid combination is
    # returned, then the request continues to process normally. If a valid
    # combination is returned, then the portal will automatically login that
    # user with the returned user id and password combination.
    #
    # For example, com.liferay.portal.security.auth.RememberMeAutoLogin reads
    # from a cookie to automatically log in a user who previously logged in
    # while checking on the "Remember Me" box.
    #
    # This interface allows deployers to easily configure the portal to work
    # with other SSO servers. See com.liferay.portal.security.auth.CASAutoLogin
    # for an example of how to configure the portal with Yale's SSO server.
    #
    auto.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




Also the below post may be useful.

http://www.liferay.com/community/forums/-/message_boards/message/4355935

Not sure if this route will be time saving as integration with an existing SSO solutions could be faster if both applications support any of the above listed ones.


-Shagul
Anamica Liferay, modificado 1 Ano atrás.

RE: Help with SSO

Junior Member Postagens: 39 Data de Entrada: 07/10/09 Postagens Recentes
Thank you Shagul... Will look into it.. emoticon
Anamica Liferay, modificado 1 Ano atrás.

RE: Help with SSO

Junior Member Postagens: 39 Data de Entrada: 07/10/09 Postagens Recentes
I am able to validate the user.. But now where do I redirect the user to after he is validated???emoticon
thumbnail
Shagul Khaja, modificado 14 Anos atrás.

RE: Help with SSO

Liferay Master Postagens: 758 Data de Entrada: 27/09/07 Postagens Recentes
Hey Lilford,

This is a very common question. I searched the forum for "Landing Page" and found a good number of links.

Here is one that you can look into.

Custom Landing page

Hope this helps.

-Shagul
Anamica Liferay, modificado 1 Ano atrás.

RE: Help with SSO

Junior Member Postagens: 39 Data de Entrada: 07/10/09 Postagens Recentes
Alright.. This might sound dumb.. emoticon

I redirect the URL as below..

http://<HOST>:<PORT>/c/portal/login?userId=<someuser>&password=<somepassword>

The CustomAutoLogin.java gets called.. However it then redirects to the liferays Login page..

What am I missing or did I get anything wrong????emoticon
thumbnail
Shagul Khaja, modificado 14 Anos atrás.

RE: Help with SSO

Liferay Master Postagens: 758 Data de Entrada: 27/09/07 Postagens Recentes
AutoLoginFilter.java has the logic shown below after it calls the login hooks.


String[] credentials = autoLogin.login(request, response);

					String redirect = (String)request.getAttribute(
						AutoLogin.AUTO_LOGIN_REDIRECT);

					if (redirect != null) {
						response.sendRedirect(redirect);

						return;
					}


Setting a request attribute "AutoLogin.AUTO_LOGIN_REDIRECT" with the redirect path may solve your issue.
Anamica Liferay, modificado 1 Ano atrás.

RE: Help with SSO

Junior Member Postagens: 39 Data de Entrada: 07/10/09 Postagens Recentes
Hey Shagul.. Thanks mate.. I got it working.. emoticon
thumbnail
Shagul Khaja, modificado 14 Anos atrás.

RE: Help with SSO

Liferay Master Postagens: 758 Data de Entrada: 27/09/07 Postagens Recentes
Good to know.
thumbnail
Michael Saechang, modificado 13 Anos atrás.

Moved Thread.

Liferay Master Postagens: 576 Data de Entrada: 19/11/07 Postagens Recentes
Moved to Using Liferay.