[Catalyst] forgotten logins
Wijnand Wiersma
wijnand at nedbsd.nl
Sun Jan 29 15:43:01 CET 2006
And to be more verbose:
Yuval Kogman wrote:
> Please dump these objects (be very very accurate with respect to
> order as well as method/key access) in the request that user should
> be in, but isn't:
>
> $c->session
> $c->{user}
> $c->request
>
[Sun Jan 29 15:37:51 2006] [catalyst] [debug]
**********************************
[Sun Jan 29 15:37:51 2006] [catalyst] [debug] * Request 7 (0.020/s) [31067]
[Sun Jan 29 15:37:51 2006] [catalyst] [debug]
**********************************
[Sun Jan 29 15:37:51 2006] [catalyst] [debug] Found sessionid
"c73908d56e414dd08007ec2b69ba97d7587a718a" in cookie
[Sun Jan 29 15:37:51 2006] [catalyst] [debug] Body Parameters are:
.---------------------------------------+--------------------------------------.
| Key |
Value |
+---------------------------------------+--------------------------------------+
| login |
Login |
| password |
test |
| uname |
test |
'---------------------------------------+--------------------------------------'
[Sun Jan 29 15:37:51 2006] [catalyst] [debug] "POST" request for
"persons/login" from "217.170.33.176"
[Sun Jan 29 15:37:51 2006] [catalyst] [debug] Path is "persons/login"
[Sun Jan 29 15:37:51 2006] [catalyst] [debug] Restored session
"c73908d56e414dd08007ec2b69ba97d7587a718a"
[Sun Jan 29 15:37:51 2006] [catalyst] [debug] $VAR1 = {
'__address' => '217.170.33.176',
'__created' => 1138545089,
'__updated' => 1138545089,
'true' => '1'
};
[Sun Jan 29 15:37:51 2006] [catalyst] [debug] $VAR1 = undef;
[Sun Jan 29 15:37:51 2006] [catalyst] [debug] $VAR1 = bless( {
'_body' => bless( {
'body' => undef,
'buffer' => '',
'content_length' => '36',
'content_type' =>
'application/x-www-form-urlencoded',
'length' => 36,
'param' => {
'login' => 'Login',
'password' => 'test',
'uname' => 'test'
},
'state' => 'done',
'upload' => {}
}, 'HTTP::Body::UrlEncoded' ),
'_context' => bless( {
'_session' => {
'__address' =>
'217.170.33.176',
'__created' =>
1138545089,
'__updated' =>
1138545089,
'true' => '1'
},
'_session_data_sig' =>
'2bd5fb7091074b6ecb6606bf0d917be0',
'_session_expires' => 1138552671,
'_sessionid' =>
'c73908d56e414dd08007ec2b69ba97d7587a718a',
'action' => bless( {
'attributes' => {
'Local' => [
undef
],
'LocalRegex' => undef,
'LocalRegexp' => undef,
'Regex' => undef,
'Regexp' => undef
},
'class' =>
'bsdjobs::Controller::Persons',
'code' =>
sub { "DUMMY" },
'name' =>
'login',
'namespace'
=> 'persons',
'reverse'
=> 'persons/login'
},
'Catalyst::Action' ),
'counter' => {
'auto' => 1,
'persons/_AUTO' => 1,
'persons/_BEGIN'
=> 1,
'persons/_DISPATCH' => 1
},
'namespace' => 'persons',
'request' => $VAR1,
'response' => bless( {
'_context' => $VAR1->{'_context'},
'body' => '',
'cookies'
=> {},
'headers'
=> bless( {
'x-catalyst' => '5.63'
}, 'HTTP::Headers' ),
'status'
=> 200
},
'Catalyst::Response' ),
'stack' => [
bless( {
'attributes' => {
'LocalRegex' => undef,
'LocalRegexp' => undef,
'Private' => [
undef
],
'Regex' => undef,
'Regexp' => undef
},
'class' =>
'bsdjobs::Controller::Persons',
'code' =>
sub { "DUMMY" },
'name' =>
'_DISPATCH',
'namespace' => 'persons',
'reverse'
=> 'persons/_DISPATCH'
},
'Catalyst::Action' ),
bless( {
'attributes' => {
'LocalRegex' => undef,
'LocalRegexp' => undef,
'Private' => [
undef
],
'Regex' => undef,
'Regexp' => undef
},
'class' =>
'bsdjobs::Controller::Persons',
'code' =>
sub { "DUMMY" },
'name' =>
'_AUTO',
'namespace' => 'persons',
'reverse'
=> 'persons/_AUTO'
},
'Catalyst::Action' ),
bless( {
'attributes' => {
'LocalRegex' => undef,
'LocalRegexp' => undef,
'Private' => [
undef
],
'Regex' => undef,
'Regexp' => undef
},
'class' =>
'bsdjobs',
'code' =>
sub { "DUMMY" },
'name' =>
'auto',
'namespace' => '',
'reverse'
=> 'auto'
},
'Catalyst::Action' )
],
'stash' => {
'sitename' => 'The
BSD job site: ',
'title' => 'Welcome
to the BSD job site'
},
'state' => 0,
'stats' => bless( {
'_children' => [
bless( {
'_children' => [],
'_depth' => 0,
'_height' => 1,
'_node' => {
'action' => '/auto',
'elapsed' => undef
},
'_parent' => $VAR1->{'_context'}{'stats'},
'_uid' => 'auto1',
'_width' => 1
}, 'Tree::Simple' )
],
'_depth' => -1,
'_height' => 2,
'_node' =>
undef,
'_parent' =>
'root',
'_uid' =>
'0x7f98c924',
'_width' => 1
},
'Tree::Simple' )
}, 'bsdjobs' ),
'action' => 'persons/login',
'address' => '217.170.33.176',
'arguments' => [],
'base' => bless( do{\(my $o =
'http://217.170.33.102:3000/')}, 'URI::http' ),
'body_parameters' => $VAR1->{'_body'}{'param'},
'cookies' => {
'bsdjobs_session' => bless( {
'name' =>
'bsdjobs_session',
'path' => '/',
'value' => [
'c73908d56e414dd08007ec2b69ba97d7587a718a'
]
},
'CGI::Cookie' )
},
'headers' => bless( {
'accept' =>
'text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5',
'accept-charset' =>
'ISO-8859-1,utf-8;q=0.7,*;q=0.7',
'accept-encoding' => 'gzip,deflate',
'accept-language' =>
'nl,en-us;q=0.7,en;q=0.3',
'connection' => 'keep-alive',
'content-length' => '36',
'content-type' =>
'application/x-www-form-urlencoded',
'cookie' =>
'bsdjobs_session=c73908d56e414dd08007ec2b69ba97d7587a718a',
'host' => '217.170.33.102:3000',
'keep-alive' => '300',
'referer' =>
'http://217.170.33.102:3000/persons/create/',
'user-agent' => 'Mozilla/5.0
(Windows; U; Windows NT 5.1; nl; rv:1.8) Gecko/20051111 Firefox/1.5'
}, 'HTTP::Headers' ),
'hostname' => 'ad002344.adsl.netland.nl',
'match' => 'persons/login',
'method' => 'POST',
'parameters' => {
'login' => 'Login',
'password' => 'test',
'uname' => 'test'
},
'path' => 'persons/login',
'protocol' => 'HTTP/1.0',
'query_parameters' => {},
'secure' => 0,
'snippets' => [],
'uploads' => {},
'uri' => bless( do{\(my $o =
'http://217.170.33.102:3000/persons/login')}, 'URI::http' ),
'user' => undef
}, 'Catalyst::Request' );
[Sun Jan 29 15:37:51 2006] [catalyst] [debug] Successfully authenticated
user 'Catalyst::Plugin::Authentication::Store::DBIC::User=HASH(0x8bfb10cc)'.
[Sun Jan 29 15:37:51 2006] [catalyst] [debug] Rendering template "index"
[Sun Jan 29 15:37:51 2006] [catalyst] [info] Request took 0.065722s
(15.216/s)
.------------------------------------------------------------------+-----------.
| Action |
Time |
+------------------------------------------------------------------+-----------+
| /auto |
0.007024s |
| /persons/login |
0.009686s |
| /end |
0.009308s |
| -> bsdjobs::View::TToolkit->process |
0.007111s |
'------------------------------------------------------------------+-----------'
I think it is odd $c->{user} dumps nothing, the user is authenticated
this request.
Next request (back to /) looks the same:
[Sun Jan 29 15:41:18 2006] [catalyst] [debug]
**********************************
[Sun Jan 29 15:41:18 2006] [catalyst] [debug] * Request 8 (0.014/s) [31067]
[Sun Jan 29 15:41:18 2006] [catalyst] [debug]
**********************************
[Sun Jan 29 15:41:18 2006] [catalyst] [debug] Found sessionid
"c73908d56e414dd08007ec2b69ba97d7587a718a" in cookie
[Sun Jan 29 15:41:18 2006] [catalyst] [debug] "GET" request for "" from
"217.170.33.176"
[Sun Jan 29 15:41:18 2006] [catalyst] [debug] Restored session
"c73908d56e414dd08007ec2b69ba97d7587a718a"
[Sun Jan 29 15:41:18 2006] [catalyst] [debug] $VAR1 = {
'__address' => '217.170.33.176',
'__created' => 1138545089,
'__updated' => 1138545089,
'true' => '1'
};
[Sun Jan 29 15:41:18 2006] [catalyst] [debug] $VAR1 = undef;
[Sun Jan 29 15:41:18 2006] [catalyst] [debug] $VAR1 = bless( {
'_body' => bless( {
'body' => undef,
'buffer' => '',
'content_length' => 0,
'content_type' => undef,
'length' => 0,
'param' => {},
'state' => 'buffering',
'upload' => {}
}, 'HTTP::Body::OctetStream' ),
'_context' => bless( {
'_session' => {
'__address' =>
'217.170.33.176',
'__created' =>
1138545089,
'__updated' =>
1138545089,
'true' => '1'
},
'_session_data_sig' =>
'2bd5fb7091074b6ecb6606bf0d917be0',
'_session_expires' => 1138552878,
'_sessionid' =>
'c73908d56e414dd08007ec2b69ba97d7587a718a',
'action' => bless( {
'attributes' => {
'LocalRegex' => undef,
'LocalRegexp' => undef,
'Private' => [
undef
],
'Regex' => undef,
'Regexp' => undef
},
'class' =>
'bsdjobs',
'code' =>
sub { "DUMMY" },
'name' =>
'default',
'namespace'
=> '',
'reverse'
=> 'default'
},
'Catalyst::Action' ),
'counter' => {
'_AUTO' => 1,
'_BEGIN' => 1,
'_DISPATCH' => 1,
'auto' => 1
},
'namespace' => '',
'request' => $VAR1,
'response' => bless( {
'_context' => $VAR1->{'_context'},
'body' => '',
'cookies'
=> {},
'headers'
=> bless( {
'x-catalyst' => '5.63'
}, 'HTTP::Headers' ),
'status'
=> 200
},
'Catalyst::Response' ),
'stack' => [
bless( {
'attributes' => {
'LocalRegex' => undef,
'LocalRegexp' => undef,
'Private' => [
undef
],
'Regex' => undef,
'Regexp' => undef
},
'class' =>
'bsdjobs',
'code' =>
sub { "DUMMY" },
'name' =>
'_DISPATCH',
'namespace' => '',
'reverse'
=> '_DISPATCH'
},
'Catalyst::Action' ),
bless( {
'attributes' => {
'LocalRegex' => undef,
'LocalRegexp' => undef,
'Private' => [
undef
],
'Regex' => undef,
'Regexp' => undef
},
'class' =>
'bsdjobs',
'code' =>
sub { "DUMMY" },
'name' =>
'_AUTO',
'namespace' => '',
'reverse'
=> '_AUTO'
},
'Catalyst::Action' ),
bless( {
'attributes' => {
'LocalRegex' => undef,
'LocalRegexp' => undef,
'Private' => [
undef
],
'Regex' => undef,
'Regexp' => undef
},
'class' =>
'bsdjobs',
'code' =>
sub { "DUMMY" },
'name' =>
'auto',
'namespace' => '',
'reverse'
=> 'auto'
},
'Catalyst::Action' )
],
'stash' => {
'sitename' => 'The
BSD job site: ',
'title' => 'Welcome
to the BSD job site'
},
'state' => 0,
'stats' => bless( {
'_children' => [
bless( {
'_children' => [],
'_depth' => 0,
'_height' => 1,
'_node' => {
'action' => '/auto',
'elapsed' => undef
},
'_parent' => $VAR1->{'_context'}{'stats'},
'_uid' => 'auto1',
'_width' => 1
}, 'Tree::Simple' )
],
'_depth' => -1,
'_height' => 2,
'_node' =>
undef,
'_parent' =>
'root',
'_uid' =>
'0x7c06286c',
'_width' => 1
},
'Tree::Simple' )
}, 'bsdjobs' ),
'action' => 'default',
'address' => '217.170.33.176',
'arguments' => [],
'base' => bless( do{\(my $o =
'http://217.170.33.102:3000/')}, 'URI::http' ),
'body_parameters' => $VAR1->{'_body'}{'param'},
'cookies' => {
'bsdjobs_session' => bless( {
'name' =>
'bsdjobs_session',
'path' => '/',
'value' => [
'c73908d56e414dd08007ec2b69ba97d7587a718a'
]
},
'CGI::Cookie' )
},
'headers' => bless( {
'accept' =>
'text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5',
'accept-charset' =>
'ISO-8859-1,utf-8;q=0.7,*;q=0.7',
'accept-encoding' => 'gzip,deflate',
'accept-language' =>
'nl,en-us;q=0.7,en;q=0.3',
'connection' => 'keep-alive',
'cookie' =>
'bsdjobs_session=c73908d56e414dd08007ec2b69ba97d7587a718a',
'host' => '217.170.33.102:3000',
'keep-alive' => '300',
'referer' =>
'http://217.170.33.102:3000/persons/login',
'user-agent' => 'Mozilla/5.0
(Windows; U; Windows NT 5.1; nl; rv:1.8) Gecko/20051111 Firefox/1.5'
}, 'HTTP::Headers' ),
'hostname' => 'ad002344.adsl.netland.nl',
'match' => '',
'method' => 'GET',
'parameters' => {},
'path' => '',
'protocol' => 'HTTP/1.0',
'query_parameters' => {},
'secure' => 0,
'snippets' => [],
'uploads' => {},
'uri' => bless( do{\(my $o =
'http://217.170.33.102:3000/')}, 'URI::http' ),
'user' => undef
}, 'Catalyst::Request' );
[Sun Jan 29 15:41:18 2006] [catalyst] [debug] Rendering template "index"
[Sun Jan 29 15:41:18 2006] [catalyst] [debug] Rendering template "index"
[Sun Jan 29 15:41:18 2006] [catalyst] [info] Request took 0.060559s
(16.513/s)
.------------------------------------------------------------------+-----------.
| Action |
Time |
+------------------------------------------------------------------+-----------+
| /auto |
0.007655s |
| /default |
0.009255s |
| -> bsdjobs::View::TToolkit->process |
0.007149s |
| /end |
0.008438s |
| -> bsdjobs::View::TToolkit->process |
0.006245s |
'------------------------------------------------------------------+-----------'
> and also list:
>
> Session plugins (State, Store, etc)
> Authentication Store (credential verifier is not necessary)
>
You mean
use Catalyst qw/-Debug Authentication Authentication::Store::DBIC
Authentication::Credential::Password FillInForm Session
Session::Store::File Session::State::Cookie Static::Simple Dumper/;
?
Wijnand
More information about the Catalyst
mailing list