It is currently Sun Jul 20, 2008 12:52 am
Moderators: dam-man, willebil, tcp




Boojam wrote:i got the same problem, with an application, where i need to authentificate towards a ldap directory,
only. In the old beta, i did this with the onLogin event out of the example.php.
is there a common way or a possiblity to externalize the user/group management
of joomla. i would love it, if i could leave that in a ldap directory?


Jinx wrote:onAfterStart doesn't exist anymore for beta2, you could use onAfterInitialise or onAfterRoute to capture the request, the difference is that onAfterRoute get's called after the application has routed itself but before it get's dispatched. What exactly do you need to do that you need to have access to the executing flow that early ?


Jinx wrote:In that case, you can just use the onAfterInitialise event fired by the application. This system event is the first event fired by the application and it is as high as we can go.

miallen wrote:Ok. But realize *every* request is authenticated. Performance will suffer if initialization is performed only to call die() with every request.
However, there is a new awkward situation. After SSO has taken place I need to set the user's information. It seems that procedure is somewhat specific to JAuthenticateResponse. I'm digging into that now but can someone direct me as to how I might do that from within a system handler as opposed to an authenticate handler?

Jinx wrote:Well, there are a few ways of handling this. You could create a authentication plugin for you specific needs and only publish that one. If you do it that way you can still use the authentication API and fire it through the $mainframe->login event which will do all the hard work for you. Would that do the trick ?

Anyway, with that out of the way, I hope it is clear that an authentication plugin cannot really be used since at no time would the user actually login

Jinx wrote:... you force the authenticate and login events through the JApplication::login function.


miallen wrote:It's actually two plugins, one is a "system" plugin for doing the SSO part and the other is the authentication plugin which is called by the SSO plugin and by the UI. We would be happy to work with anyone who tries this. It seems to work perfectly on two systems we have here.
It would be nice if the extension installer could enumerate and install multiple plugins from the same zip file. Has anyone given any thought to doing that?
Thanks for your help Johan. No doubt I'll be back. Now I'm looking at trying to get contacts from AD.


pvh123 wrote:Mike,
I have been working with sso and security tools in the past and I was just wondering a practical point: What if the user changes its password? I suppose it will only be its Joomla user PW and will be aggregated right down into kerberos, ending up in the apps feeded by Kerberos?
Pieter

Jinx wrote:Great to hear things are working, means we designed it properly :)



ianmac wrote:While still not ideal, I suppose, have you tried using the $mainframe->close() method? This method will close the session and will then invoke the exit call.
I don't know if this helps at all, but just thoughts that came that you might experiment with.
foreach (glob('plugins/init/*.php') as $path) {
include($path);
$fname = substr($path, 13, strpos($path, '.') - 13) . '_init';
$fname();
}
miallen wrote:
Yes, that does help. With $mainframe->close() in place of die() the plugin now behaves correctly when Logout is invoked. The session appears to be saved properly. I can live with this solution. Sorry I didn't check the documentation more closely.
However, I still would really like to see something like the following at the top of the index.php's:
- Code: Select all
foreach (glob('plugins/init/*.php') as $path) {
include($path);
$fname = substr($path, 13, strpos($path, '.') - 13) . '_init';
$fname();
}
This really is not very intrusive and it would be a very significant performance improvement for multi-request SSO plugins (consider that a mysql query occurs before the onAfterInitialise handler is called).
Mike
PS: Yes, we are using a system plugin. My understanding is onAfterInitialise is the first event fired.

ianmac wrote:What I meant by that is that to import the system plugin, all that really happens is that the file is included. So this is probably bad form, and not recommended, but you could include code in that file outside of your classes and functions that would perform the check that needs to be done.





CoolAcid wrote:Hey guys, just want to jump in here.
from a AAA point - I'd like to include this in the joomlaAAA on the joomlacode site so we have all the AAA stuff in one place. Would you guys mind? I can add you to the project so you can maintain your code online.



redndahead wrote:I'm looking into creating a plugin for CAS and I'm new to Joomla design. So an example or outline if you have the time would help.
