<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Hi All,<br><br>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:<br><br>__PACKAGE__->config( <br> 'Plugin::ConfigLoader' => {<br> driver => {<br> 'General' => {<br> -LowerCaseNames => 1,<br> },<br> },<br> file => __PACKAGE__->path_to('conf'),<br> },<br> 'Plugin::Session' =>
{<br> expires => 3600,<br> storage => '/home/amit/GISTFIND/tmp/session',<br> },<br> 'Plugin::Authentication' => {<br> default_realm => 'general', <br> general => {<br> credential => {<br> class => 'Password',<br> password_field => 'login_password',<br> password_type =>
'clear'<br> },<br> store => {<br> class => 'DBIx::Class',<br> user_model => 'DB::Login',<br> role_column => 'roles',<br> }<br> },<br> ldap => {<br> credential => {<br> class =>
'Password',<br> password_field => 'password',<br> password_type => 'clear'<br> },<br> store => {<br> binddn => "cn=Manager, dc=example, dc=com",<br> bindpw => "secret",<br>
class => "LDAP",<br> ldap_server => "192.168.100.50",<br> ldap_server_options => { timeout => 30, port => '389', },<br> user_basedn => "dc=example,dc=com",<br> user_field => "uid",<br> user_results_filter => sub { return shift->pop_entry
}, <br> },<br> },<br> },<br>);<br><br>When I search LDAP using Net::LDAP It authenticate the user and return the DN for that. <br><br>dn:uid=shanu,dc=example,dc=com<br> uid: shanu<br>userPassword: shanu<br> objectClass: account<br> simpleSecurityObject<br> top<br>uid=shanu,dc=example,dc=com checks out!<br><br>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.<br><br>if ($c->authenticate({ id => $username, password => $password }, 'ldap')) {<br> $c->stash->{auth}-> "asa";<br>} <br><br><span style="font-style: italic;"><span
style="font-weight: bold;"><br>Thanks<br><br></span></span><div><strong><em><font face="Times New Roman" size="5"> </font></em></strong></div></td></tr></table><br>
<!--1--><hr size=1></hr>
Your Mail works best with the New Yahoo Optimized IE8. <a href="http://in.rd.yahoo.com/tagline_ie8_new/*http://downloads.yahoo.com/in/internetexplorer/" target="_blank">Get it NOW!</a>.