Page 1 of 1

Login - JAuthentication

Posted: Fri Aug 24, 2007 5:19 pm
by axelsauerhoefer
Hi everybody,

today i wrote an authentication plugin for authentification over ssh login. After installation i activated the plugin, but dont disabled the standard joomla plugin. Everytime i tried to test my ssh plugin, my code was not executed. I found out, that the authenticate function from JAuthentication breaks the plugin loop after finding a valid login. But this isnt the behavior i expected.

It is not much better to check all activated plugins, if the returned ok and if some one failed to deny the access ?

best regards,
axel

Re: Login - JAuthentication

Posted: Fri Aug 24, 2007 8:00 pm
by RobS
We spent a bit of time contemplating this strategy and when it comes to login, you may want to offer multiple options such as regular and OpenID so you need the system to behave this way. 

I think you could most likely achieve what you want with a user plugin instead that listens for onLoginUser().  The onLoginUser event in Joomla! is what actually puts the cookies and place and the session in the database.  JAuthentication, just checks that they are using a valid set of credentials.  So, what you would do is created a user plugin that listens to onLoginUser() and when that is fired, launch the SSH login system.  If I remember correctly, if one of the onLoginUser() events fail, they all fail.  That is how Joomla! is capable of handling single sign-on systems.

I hope that helps.

Re: Login - JAuthentication

Posted: Sat Aug 25, 2007 11:58 am
by axelsauerhoefer
Hi RobS,

thank you very much for this anwser, it helped me a lot :) i am very new with Joomla 1.5 and the available events.

best regards,
axel