Can anyone help me?
Genius at work
--- On Mon, 15/2/10, Amit Jha <shanu_...@yahoo.co.in> wrote:
From: Amit Jha <shanu_...@yahoo.co.in>
Subject: [Catalyst] Authentication Using Catalyst::Authentication::Store::LDAP
To: Catalyst@lists.scsys.co.uk
Date: Monday, 15 February, 2010, 1:41 PM
Hi All,
In my authentication module I am trying to add DBIC and LDAP authentication
via Catalyst::Authentication::Store::LDAP. DBIC is working fine but LDAP is
not. Following is app configuration file:
__PACKAGE__->config(
'Plugin::ConfigLoader' => {
driver => {
'General' => {
-LowerCaseNames => 1,
},
},
file => __PACKAGE__->path_to('conf'),
},
'Plugin::Session' =>
{
expires => 3600,
storage => '/home/amit/GISTFIND/tmp/session',
},
'Plugin::Authentication' => {
default_realm => 'general',
general => {
credential => {
class => 'Password',
password_field => 'login_password',
password_type =>
'clear'
},
store => {
class => 'DBIx::Class',
user_model => 'DB::Login',
role_column => 'roles',
}
},
ldap => {
credential => {
class =>
'Password',
password_field => 'password',
password_type => 'clear'
},
store => {
binddn => "cn=Manager, dc=example, dc=com",
bindpw => "secret",
class => "LDAP",
ldap_server => "192.168.100.50",
ldap_server_options => { timeout => 30, port => '389', },
user_basedn => "dc=example,dc=com",
user_field => "uid",
user_results_filter => sub { return shift->pop_entry
},
},
},
},
);
When I search LDAP using Net::LDAP It authenticate the user and return the DN
for that.
dn:uid=shanu,dc=example,dc=com
uid: shanu
userPassword: shanu
objectClass: account
simpleSecurityObject
top
uid=shanu,dc=example,dc=com checks out!
But when I try the same from catalyst I won't show any thing. Can anyone point
me what to do and how to debug it.
if ($c->authenticate({ id => $username, password => $password }, 'ldap')) {
$c->stash->{auth}-> "asa";
}
Thanks
Your Mail works best with the New Yahoo Optimized IE8. Get it NOW!.
-----Inline Attachment Follows-----
_______________________________________________
List: Catalyst@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!
http://downloads.yahoo.com/in/internetexplorer/
_______________________________________________
List: Catalyst@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/