[Catalyst-commits] r10309 -
branches/Catalyst-Plugin-Authentication/credential_remote/lib/Catalyst/Authentication/Credential
kmx at dev.catalyst.perl.org
kmx at dev.catalyst.perl.org
Wed May 27 06:25:38 GMT 2009
Author: kmx
Date: 2009-05-27 06:25:38 +0000 (Wed, 27 May 2009)
New Revision: 10309
Modified:
branches/Catalyst-Plugin-Authentication/credential_remote/lib/Catalyst/Authentication/Credential/Remote.pm
Log:
branch Credential::Remote - example in doc made compatible with 5.80004 and before
Modified: branches/Catalyst-Plugin-Authentication/credential_remote/lib/Catalyst/Authentication/Credential/Remote.pm
===================================================================
--- branches/Catalyst-Plugin-Authentication/credential_remote/lib/Catalyst/Authentication/Credential/Remote.pm 2009-05-27 05:55:27 UTC (rev 10308)
+++ branches/Catalyst-Plugin-Authentication/credential_remote/lib/Catalyst/Authentication/Credential/Remote.pm 2009-05-27 06:25:38 UTC (rev 10309)
@@ -141,11 +141,13 @@
# in your Controller/Root.pm you can implement "auto-login" in this way
sub begin : Private {
my ( $self, $c ) = @_;
- if(defined($c->req->remote_user) and !$c->user_exists) {
+ unless ($c->user_exists) {
# authenticate() for this module does not need any user info
# as the username is taken from $c->req->remote_user and
# password is not needed
- $c->authenticate( {} );
+ unless ($c->authenticate( {} )) {
+ # return 403 forbidden or kick out the user in other way
+ };
}
}
More information about the Catalyst-commits
mailing list