Change default username_field back to 'username', as this fits in better with the...
Tomas Doran [Tue, 25 Aug 2009 14:27:40 +0000 (14:27 +0000)]
lib/Catalyst/Authentication/Credential/Remote.pm
t/lib/RemoteTestApp1.pm

index 4bf8960..55b485f 100644 (file)
@@ -35,7 +35,7 @@ sub new {
     }
     $self->source($config->{source} || 'REMOTE_USER');
     $self->realm($realm);
-    $self->username_field($config->{username_field} || 'id');
+    $self->username_field($config->{username_field} || 'username');
     return $self;
 }
 
index ff66626..dbba67c 100644 (file)
@@ -28,7 +28,7 @@ __PACKAGE__->config(
 sub default : Local {
     my ( $self, $c ) = @_;
     if ($c->authenticate()) {
-        $c->res->body('User:' . $c->user->{id});
+        $c->res->body('User:' . $c->user->{username});
     }
     else {
         $c->res->body('FAIL');