Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Dipanjan Das
authenticate user through external authetication system
December 29, 2012 5:41 AM
Answer

Dipanjan Das

Rank: Junior Member

Posts: 30

Join Date: September 28, 2012

Recent Posts

Hi,
I am facing some problem in liferay. We have some external authentication system that will validate a user credential. I need to write a hook that authenticate a user from external authentication system, bypassing literary authentication. Please let me guide with code/configuration in details.t
Samuel Kong
RE: authenticate user through external authetication system
December 30, 2012 10:40 PM
Answer

Samuel Kong

LIFERAY STAFF

Rank: Liferay Master

Posts: 979

Join Date: March 10, 2008

Recent Posts

Look into the "auto.login.hooks" portal property. You'll need to implement your own AutoLogin class and add your class to this property.
Hitoshi Ozawa
RE: authenticate user through external authetication system
December 30, 2012 11:36 PM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7990

Join Date: March 23, 2010

Recent Posts

Samuel, isn't that to get valid user/password pair rather than validate user credentials?

These classes will run in consecutive order for all unauthenticated users until one of them returns a valid user id and password combination.

http://www.liferay.com/documentation/liferay-portal/6.1/user-guide/-/ai/auto-login

I thought it was more of creating a custom Authentication Pipeline.

##
## Authentication Pipeline
##

#
# Input a list of comma delimited class names that implement
# com.liferay.portal.security.auth.Authenticator. These classes will run
# before or after the portal authentication begins.
#
# The Authenticator class defines the constant values that should be used
# as return codes from the classes implementing the interface. If
# authentication is successful, return SUCCESS; if the user exists but the
# passwords do not match, return FAILURE; and if the user does not exist on
# the system, return DNE.
#
# Constants in Authenticator:
# public static final int SUCCESS = 1;
# public static final int FAILURE = -1;
# public static final int DNE = 0;


# In case you have several classes in the authentication pipeline, all of
# them have to return SUCCESS if you want the user to be able to login. If
# one of the authenticators returns FAILURE or DNE, the login fails.

====================
#
# Set this to true to enable password checking by the internal portal
# authentication. If set to false, you're essentially delegating password
# checking is delegated to the authenticators configured in
# "auth.pipeline.pre" and "auth.pipeline.post" settings.
#
auth.pipeline.enable.liferay.check=true