[dev] Identity drivers

Richard Wallace rwallace at thewallacepack.net
Tue Oct 26 16:31:05 PDT 2004


Hey guys,

I'm working on creating a custom Identity driver for our system.  We 
could use the $type parameter to Identity::singleton() to have it create 
an application specific instance of the identity, but the identity 
itself is going to be used across multiple applications and they 
shouldn't need to know about the application itself.  It also seems like 
it would be awkward to have them lookup in the configuration what type 
of Identity object they should be using.

So, I'd like to modify the way the singleton() method works to find the 
Identity object in the configuration.  This isn't a problem.  What is 
(or could be) a problem is that there is one Identity object per user. 
At first glance this makes sense, but when you start thinking about 
having a LDAP or SQL backend Identity (and a composite cause we'll 
actually be using both as sources), you're talking about having one 
connection to the backend per user you want to lookup.  Sure, you could 
try and do a persistent connection for SQL, but I don't think that 
really addresses the issue.

So, I'm trying to figure out the best way to go about this.  Right now 
I'm leaning towards the way the Auth class gets its configuration data. 
  The dev calls Identity::singleton($conf['identity']['driver']) and 
possibly the $params.  If the $params are not passed then they are 
looked up with Horde::getDriverConfig().

Is this the best way to do this and would you guys be interested in me 
committing these changes to Horde?

Thanks,
Rich


More information about the dev mailing list