[Catalyst] Authentication Using Catalyst::Authentication::Store::LDAP

Amit Jha shanu_040 at yahoo.co.in
Thu Feb 18 12:56:35 GMT 2010


Can anyone help me?

Genius at work=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0

--- On Mon, 15/2/10, Amit Jha <shanu_040 at yahoo.co.in> wrote:

From: Amit Jha <shanu_040 at yahoo.co.in>
Subject: [Catalyst] Authentication Using Catalyst::Authentication::Store::L=
DAP
To: Catalyst at lists.scsys.co.uk
Date: Monday, 15 February, 2010, 1:41 PM

Hi All,

In my authentication module I am trying to add=A0 DBIC and LDAP authenticat=
ion via Catalyst::Authentication::Store::LDAP. DBIC is working fine but LDA=
P is not. Following is app configuration file:

__PACKAGE__->config( =

=A0=A0=A0 'Plugin::ConfigLoader' =3D> {
=A0=A0=A0=A0=A0=A0=A0 driver =3D> {
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 'General' =3D> {
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0 =A0-LowerCaseNames =3D> 1,
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 },
=A0=A0=A0=A0=A0=A0=A0 },
=A0=A0=A0=A0=A0=A0=A0 file =3D> __PACKAGE__->path_to('conf'),
=A0=A0=A0 },
=A0=A0=A0 'Plugin::Session' =3D>
 {
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 expires =3D> 3600,
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 storage =3D> '/home/amit/GISTFIND/tmp/ses=
sion',
=A0=A0=A0=A0 },
=A0=A0=A0=A0 'Plugin::Authentication' =3D> {
=A0=A0=A0=A0 =A0=A0=A0 default_realm =3D> 'general',=A0=A0=A0=A0 =A0=A0=A0 =

=A0=A0=A0=A0=A0=A0=A0 general =3D> {
=A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0 credential =3D> {
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0 class =3D> 'Password',
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 password_field =3D> 'login_pa=
ssword',
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 password_type =3D>
 'clear'
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 },
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 store =3D> {
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0 class =3D> 'DBIx::Class',
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 user_model =3D> 'DB::Login',
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 role_column =3D> 'roles',
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 }
=A0=A0=A0=A0=A0=A0=A0 },
=A0=A0=A0=A0=A0=A0=A0 ldap =3D> {
=A0=A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0 credential =3D> {
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0 class =3D>
 'Password',
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 password_field =3D> 'password=
',
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 password_type =3D> 'clear'
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 },
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 store =3D> {
=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 binddn=A0=A0=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0 =3D> "cn=3DManager, dc=3Dexample, dc=3Dcom",
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 bindpw=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0 =3D> "secret",
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0
 class=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 =3D> "LDAP",
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ldap_server=A0=A0=A0=A0=A0=A0=
=A0=A0 =3D> "192.168.100.50",
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ldap_server_options =3D> { ti=
meout =3D> 30, port =3D> '389', },
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 user_basedn=A0=A0=A0=A0=A0=A0=
=A0=A0 =3D> "dc=3Dexample,dc=3Dcom",
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 user_field=A0=A0=A0=A0=A0=A0=
=A0=A0=A0 =3D> "uid",
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 user_results_filter =3D> sub =
{ return shift->pop_entry
 },=A0=A0=A0 =

=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 },
=A0=A0=A0=A0=A0=A0=A0=A0 },
=A0=A0=A0=A0 },
);

When I search LDAP using Net::LDAP It authenticate the user and return the =
DN for that. =


dn:uid=3Dshanu,dc=3Dexample,dc=3Dcom
=A0uid: shanu
userPassword: shanu
=A0objectClass: account
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 simpleSecurityObject
=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 top
uid=3Dshanu,dc=3Dexample,dc=3Dcom checks out!

But when I try the same from catalyst I won't show any thing. Can anyone po=
int me what to do and how to debug it.

if ($c->authenticate({ id =3D> $username, password =3D> $password=A0 }, 'ld=
ap')) {
=A0=A0=A0=A0 $c->stash->{auth}-> "asa";
} =



Thanks

=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0

       =

Your Mail works best with the New Yahoo Optimized IE8. Get it NOW!.
-----Inline Attachment Follows-----

_______________________________________________
List: Catalyst at lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/



      Your Mail works best with the New Yahoo Optimized IE8. Get it NOW! ht=
tp://downloads.yahoo.com/in/internetexplorer/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20100218/66f72=
f80/attachment.htm


More information about the Catalyst mailing list