Tribune

Home » Liferay Portal » English » 3. Development

Vista Combinata Vista Piatta Vista ad Albero
Discussioni [ Precedente | Successivo ]
toggle
Mario Duck
Creating a login.events.pre hook in liferay
14 dicembre 2012 17.25
Risposta

Mario Duck

Punteggio: New Member

Messaggi: 7

Data di Iscrizione: 11 dicembre 2012

Messaggi recenti

I'm very new to liferay and am creating a hook on the login.events.pre event. My users will be signing in to the website by using their phone number, so I have to do some validations on the status of their phone line before letting liferay create a session for the user. I've already created the portlet and am able to execute some java code before letting liferay take care of the login validation, but I'm not sure how to stop the whole process if my validation fails. In other words, if I find out that the users phone line is suspended, I don't want liferay to allow them to sign in, even if the right login info has been provided by the user. Is it possible to do this in the login.events.pre event in liferay?
Jelmer Kuperus
RE: Creating a login.events.pre hook in liferay
15 dicembre 2012 2.29
Risposta

Jelmer Kuperus

Punteggio: Liferay Legend

Messaggi: 1192

Data di Iscrizione: 10 marzo 2010

Messaggi recenti

I am assuming you are implementing the Authenticator interface

Just return Authenticator.FAILURE