[Catalyst] progressive authentication via db & LDAP

Tomas Doran bobtfish at bobtfish.net
Tue Jan 25 10:16:51 GMT 2011


On 25 Jan 2011, at 10:01, piccard wrote:
> In view of that, I've got one more question. What I would really  
> need, is a password authentification against LDAP and if successful,
> get the user and his roles from the database. So, is it possible to  
> split up this process and still use methods like  
> check_any_user_role()?

I don't think you want the authentication framework to be doing that  
for you.

If that's what you're _actually_ doing, then putting the  
authentication logic into your user class makes much more sense, and  
makes your data model much more consistent... Otherwise you have to  
replicate the authentication framework if you ever want to log a user  
in (or simulate a 'proper' user, or change password, or..) outside the  
context of the Catalyst application.

The authentication framework already provides this sort of hook for  
you, with the self_check configuration option, which says that the  
user class is responsible for checking it's own password.

Cheers
t0m




More information about the Catalyst mailing list