Hello all,
i would like to use catalyst framework for a ldap authenticated web
interface. Anonymous bind is not allowed so I have configured binddn and
bindpw in the config. After successful authentication, all further request
should be executed via the credentials of the logged in user.
In the login controller the user is authenticated
[...]
# Get the username and password from form
my $username = $c->request->params->{username};
my $password = $c->request->params->{password};
# If the username and password values were found in form
if ($username && $password) {
# Attempt to log the user in
if ($c->authenticate({ username => $username,
password => $password })) {
[...]
But when I do a new request from within another controller, i get an ldap
error meaning the credentials are invalid:
code in other controller:
[...]
my $ldapconn = $c->user->ldap_connection();
my $mesg = $ldapconn->search( base => "ou=users,dc=example,dc=com",
filter => "(uid=*)");
my @entries = $mesg->sorted('uid');
$c->stash(users => \@entries,);
$c->stash(template => 'userList.tt2');
[...]
I use sessions:
Session
Session::Store::FastMmap
Session::State::Cookie
Can anybody give me a hint how to solve this problem?
Best regards,
Birger
_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/