[Catalyst] Problem with Catalyst Authorization

hlampert at earthlink.net hlampert at earthlink.net
Fri Jun 23 19:07:25 CEST 2006


Hello Matt,

I apologize for writing to you directly, but I can not post to the Catalyst mailing list from work - my relayed e-mails are rejected by the mail server.

I notice you post a lot on the mailing list and was wondering if you could help me with a problem I am having getting DBIx::Class based authorization to work.  I believe I have set everything up correctly  for role based authorization and authentication works fine, however when I try to call $c->assert_user_roles I get an error.  I have spent days digging into the DBIx::Class code - if I can't figure it out soon I will be forced to write my own authorization code, which of course I would prefer not to do.

My Application's name is LBBWCompliance.  I am running Catalyst 5.65 on a Windows based system using the PPM's available from the repositories of  ActiveState , The University of Winnipeg, and ngmedia.net.  The error I get is:

    Caught exception in LBBWCompliance::Controller::Authentication->login "Tried to insert non-reference in a Set::Object at C:/Perl/site/lib/Catalyst/Plugin/Authentication/Store/DBIC/User.pm line 65."


The complete error page is included below.

The model used for authorization (LBBWCompliance::Model::LBBWComplianceData) is built on Catalyst::Model::DBIC, and therefore the classes are automatically defined based on DBIx::Class::Loader.  I understand  DBIx::Class:Schema is now in vogue, but I do not have access to the schema variant of the model in a PPM.  I'm thinking this might be causing my problem, but I'm hoping not.

When I enable SQL tracing, I see the debug segment listed below in the console window. The queries with the JOIN conditions appear to be correct and return good results when run in the SQL query analyzer.

Further analyzing the problem, the line that raises the error, line 65 in User.pm  (in the check_roles subroutine) says:

    my $have = Set::Object->new( $self->roles( @wanted_roles ) );

The called $self->roles method has a lot of stuff but basically comes down to the DBIC code. I believe the problem is caused by the mapping in the return statement, but I have no easy way to trace this:

sub roles {
   
<code deleted>

    # optimized join if using DBIC
    if (Scalar::Util::blessed($cfg->{role_class})) {
        my $search = {
            $cfg->{role_rel} . '.' . $cfg->{user_role_user_field}
                => $self->obj->id
        };
        if ( @wanted_roles ) {
            $search->{ 'me.' . $role_field } = {
                -in => \@wanted_roles
            };
        }

        my $rs = $cfg->{role_class}->search(
            $search,
            { join => $cfg->{role_rel},
              cols => [ 'me.' . $role_field ],
            }
        );
        return map { $_->$role_field } $rs->all;
    }
    <code deleted>
}

If you could point me in the direction of solving this problem, I would be much obliged!

Hugh Lampert
hlampert at earthlink.net


----------------------------------------------------------------------------------------------------------------------------
Debug segment:

[Thu Jun 22 16:21:53 2006] [catalyst] [info] LBBWCompliance powered by Catalyst
5.65
You can connect to your server at http://ny500337:3000
SELECT me.employeeID, me.password FROM Users me WHERE ( employeeID = ? ): `40'
SELECT me.employeeID, me.password FROM Users me WHERE ( employeeID = ? ): `40'
SELECT me.RoleCode FROM Roles me LEFT JOIN UserRoles UserRoles ON ( UserRoles.ro
leID = me.RoleID ) WHERE ( UserRoles.employeeID = ? AND me.RoleCode IN ( ? ) ):
`40', `admin'
SELECT me.RoleCode FROM Roles me LEFT JOIN UserRoles UserRoles ON ( UserRoles.ro
leID = me.RoleID ) WHERE ( UserRoles.employeeID = ? AND me.RoleCode IN ( ? ) ):
`40', `user'
SELECT me.RoleCode FROM Roles me LEFT JOIN UserRoles UserRoles ON ( UserRoles.ro
leID = me.RoleID ) WHERE ( UserRoles.employeeID = ? AND me.RoleCode IN ( ? ) ):
`40', `user'
[Thu Jun 22 16:22:03 2006] [catalyst] [debug] **********************************

[Thu Jun 22 16:22:03 2006] [catalyst] [debug] * Request 1 (0.071/s) [1592]
[Thu Jun 22 16:22:03 2006] [catalyst] [debug] **********************************

[Thu Jun 22 16:22:03 2006] [catalyst] [debug] Body Parameters are:
.---------------------------------------+--------------------------------------.

| Key                                   | Value                                |

+---------------------------------------+--------------------------------------+

| employeeID                            | 40                                   |

| password                              | test                                 |

| submit                                | Submit                               |

'---------------------------------------+--------------------------------------'


[Thu Jun 22 16:22:03 2006] [catalyst] [debug] "POST" request for "authentication
/login" from "192.168.1.114"
[Thu Jun 22 16:22:03 2006] [catalyst] [debug] Path is "authentication/login"
[Thu Jun 22 16:22:03 2006] [catalyst] [debug] action namespace 'authentication',
 action authentication/login
[Thu Jun 22 16:22:03 2006] [catalyst] [debug] employeeID: '40', password:'test'
[Thu Jun 22 16:22:03 2006] [catalyst] [debug] employee Last: 'Adams IV', employe
e First:'William'
[Thu Jun 22 16:22:03 2006] [catalyst] [debug] Created session "b782d2edb78226908
344300be9541878"
[Thu Jun 22 16:22:03 2006] [catalyst] [debug] Successfully authenticated user 'C
atalyst::Plugin::Authentication::Store::DBIC::User=HASH(0x9b89590)'.
[Thu Jun 22 16:22:03 2006] [catalyst] [debug] Debug1
[Thu Jun 22 16:22:03 2006] [catalyst] [debug] userCatalyst::Plugin::Authenticati
on::Store::DBIC::User=HASH(0x9b89590)
[Thu Jun 22 16:22:03 2006] [catalyst] [debug] Rendering template "LBBWCompliance
Login.tt2"
[Thu Jun 22 16:22:05 2006] [catalyst] [error] Caught exception in LBBWCompliance
::Controller::Authentication->login "Tried to insert non-reference in a Set::Obj
ect at C:/Perl/site/lib/Catalyst/Plugin/Authentication/Store/DBIC/User.pm line 6
5."
[Thu Jun 22 16:22:05 2006] [catalyst] [info] Request took 1.937513s (0.516/s)
.------------------------------------------------------------------+-----------.

| Action                                                           | Time      |

+------------------------------------------------------------------+-----------+

| /auto                                                            | 0.001370s |

| /authentication/auto                                             | 0.037179s |

| /authentication/login                                            | 0.067444s |

| /end                                                             | 0.343466s |

|  -> LBBWCompliance::View::TToolkit->process                      | 0.341029s |

'------------------------------------------------------------------+-----------'



-----------------------------------------------------------------------------------------------------------------------------------
Here is the relevant section  from my LBBWCompliance.pm file:

    package LBBWCompliance;

    use strict;
    use warnings;
    use Data::Dumper;
    use LBBWCompliance::Utility::LBBWComplianceDBIO;
    #
    # Set flags and add plugins for the application
    #
    #         -Debug: activates the debug mode for very useful log messages
    # Static::Simple: will serve static files from the application's root
    # directory
    #
    use Catalyst qw(-Debug
     ConfigLoader
     Static::Simple
     Authentication
     Authentication::Store::DBIC
     Authentication::Credential::Password
     Session
     Session::Store::File
     Session::State::Cookie
     Authorization::Roles );

    our $VERSION = '0.01';

    #
    # Start the application
    #

    __PACKAGE__->config(name => 'LBBW Compliance',
                        defaultStyleSheet => '/css/LBBWStyle.css',
                        application => 'LBBW Compliance',
                        'View::TToolkit' => {'INCLUDE_PATH' => __PACKAGE__->path_to('templates')},
                        authentication => {'dbic' => {user_class =>
                                                      'LBBWCompliance::Model::LBBWComplianceData::Users',
                                                      user_field => 'employeeID',
                                                      password_field => 'password',
                                                      password_type=> 'clear',
                                                      password_hash_type => 'SHA-1'
                                                     }},
                        authorization => {'dbic' => {role_class =>
                                                     'LBBWCompliance::Model::LBBWComplianceData::Roles',
                                                     role_field => 'RoleCode',
                                                     role_rel => 'UserRoles',
                                                     user_role_user_field => 'employeeID'}},
                        session => {expires => 3600,
                                   storage => '/tmp/session'}
                       );


    __PACKAGE__->setup;



    # set the role to userRole mapping relationship for authorization.
    LBBWCompliance::Model::LBBWComplianceData::Roles
      ->has_many(UserRoles => 'LBBWCompliance::Model::LBBWComplianceData::UserRoles','roleID');

    LBBWCompliance::Model::LBBWComplianceData::Users
      ->has_many(UserRoles => 'LBBWCompliance::Model::LBBWComplianceData::UserRoles','employeeID');


    LBBWCompliance::Model::LBBWComplianceData::Roles->storage->debug(1);

--------------------------------------------------------------------------------------------------------------------------------------
Here is the relevant section from Authentication.pm:

  # try to log in
  if ($c->login($employeeID, $password)) {
    $c->stash->{loginMessage} = "Successful login for '$empLast, $empFirst'."
      . ($c->check_user_roles('admin') ? "as Admin." : "")
        . ($c->check_user_roles('user') ? "as User." : "");

    $c->log->debug("Debug" . $c->debug);
    $c->log->debug("user" . $c->user);
    $c->assert_user_roles('user');
    my $temp = $c->check_user_roles("user");
    $c->log->debug("authorization: $temp");

    $c->log->debug("authorization: ".
                   ($c->check_user_roles('admin') ? "Admin." : "not Admin ").
                   ($c->check_user_roles('user') ? "User." : "not User"));

    $c->stash->{template} = 'LBBWComplianceLogin.tt2';
    # set session ok
  } # if ($c->login($user, $password))
  else {
    $c->stash->{loginMessage} = "Incorrect password entered for selected user ".
      "'$empLast, $empFirst'.<br /> Please try again.";
    $c->stash->{template} = 'LBBWComplianceLogin.tt2';
    return;
  } # else of if ($c->login($employeeID, $password))

--------------------------------------------------------------------------------------------------------------------------------------
Here is the complete error output:


Caught exception in LBBWCompliance::Controller::Authentication->login "Tried to insert non-reference in a Set::Object at C:/Perl/site/lib/Catalyst/Plugin/Authentication/Store/DBIC/User.pm line 65."

Request

bless( {
                 'protocol' => 'HTTP/1.0',
                 'headers' => bless( {
                                       'user-agent' => 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.4) Gecko/20060508 Firefox/1.5.0.4',
                                       'connection' => 'keep-alive',
                                       'keep-alive' => '300',
                                       'accept' => 'text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5',
                                       'accept-language' => 'en-us,en;q=0.5',
                                       'accept-encoding' => 'gzip,deflate',
                                       'content-length' => '41',
                                       'host' => 'ny500337:3000',
                                       'accept-charset' => 'ISO-8859-1,utf-8;q=0.7,*;q=0.7',
                                       'content-type' => 'application/x-www-form-urlencoded',
                                       'referer' => 'http://ny500337:3000/'
                                     }, 'HTTP::Headers' ),
                 'snippets' => [],
                 'body_parameters' => {
                                        'password' => 'test',
                                        'employeeID' => '40',
                                        'submit' => 'Submit'
                                      },
                 'secure' => 0,
                 'hostname' => 'ny500196.lbbwus.int',
                 'uploads' => {},
                 'user' => bless( {
                                    'obj' => bless( {
                                                      'result_source' => bless( {
                                                                                  'resultset_attributes' => {},
                                                                                  'result_class' => 'LBBWCompliance::Model::LBBWComplianceData::Users',
                                                                                  'name' => 'Users',
                                                                                  'schema' => bless( {
                                                                                                       'class_mappings' => {
                                                                                                                             'LBBWCompliance::Model::LBBWComplianceData::Users' => 'LBBWCompliance::Model::LBBWComplianceData::Users',
                                                                                                                             'LBBWCompliance::Model::LBBWComplianceData::UserRoles' => 'LBBWCompliance::Model::LBBWComplianceData::UserRoles',
                                                                                                                             'LBBWCompliance::Model::LBBWComplianceData::Roles' => 'LBBWCompliance::Model::LBBWComplianceData::Roles'
                                                                                                                           },
                                                                                                       'source_registrations' => {
                                                                                                                                   'LBBWCompliance::Model::LBBWComplianceData::Users' => $VAR1->{'user'}{'obj'}{'result_source'},
                                                                                                                                   'LBBWCompliance::Model::LBBWComplianceData::UserRoles' => bless( {
                                                                                                                                                                                                      'resultset_attributes' => {},
                                                                                                                                                                                                      'result_class' => 'LBBWCompliance::Model::LBBWComplianceData::UserRoles',
                                                                                                                                                                                                      'name' => 'UserRoles',
                                                                                                                                                                                                      'schema' => $VAR1->{'user'}{'obj'}{'result_source'}{'schema'},
                                                                                                                                                                                                      '_relationships' => {},
                                                                                                                                                                                                      '_columns_info_loaded' => 1,
                                                                                                                                                                                                      '_ordered_columns' => [
                                                                                                                                                                                                                              'employeeID',
                                                                                                                                                                                                                              'roleID'
                                                                                                                                                                                                                            ],
                                                                                                                                                                                                      '_primaries' => [
                                                                                                                                                                                                                        'employeeID',
                                                                                                                                                                                                                        'roleID'
                                                                                                                                                                                                                      ],
                                                                                                                                                                                                      '_resultset' => undef,
                                                                                                                                                                                                      'resultset_class' => 'DBIx::Class::ResultSet',
                                                                                                                                                                                                      '_unique_constraints' => {
                                                                                                                                                                                                                                 'primary' => $VAR1->{'user'}{'obj'}{'result_source'}{'schema'}{'source_registrations'}{'LBBWCompliance::Model::LBBWComplianceData::UserRoles'}{'_primaries'}
                                                                                                                                                                                                                               },
                                                                                                                                                                                                      '_columns' => {
                                                                                                                                                                                                                      'employeeID' => {},
                                                                                                                                                                                                                      'roleID' => {}
                                                                                                                                                                                                                    }
                                                                                                                                                                                                    }, 'DBIx::Class::ResultSource::Table' ),
                                                                                                                                   'LBBWCompliance::Model::LBBWComplianceData::Roles' => bless( {
                                                                                                                                                                                                  'resultset_attributes' => {},
                                                                                                                                                                                                  'result_class' => 'LBBWCompliance::Model::LBBWComplianceData::Roles',
                                                                                                                                                                                                  'name' => 'Roles',
                                                                                                                                                                                                  'schema' => $VAR1->{'user'}{'obj'}{'result_source'}{'schema'},
                                                                                                                                                                                                  '_relationships' => {
                                                                                                                                                                                                                        'UserRoles' => {
                                                                                                                                                                                                                                         'cond' => {
                                                                                                                                                                                                                                                     'foreign.roleID' => 'self.RoleID'
                                                                                                                                                                                                                                                   },
                                                                                                                                                                                                                                         'source' => 'LBBWCompliance::Model::LBBWComplianceData::UserRoles',
                                                                                                                                                                                                                                         'attrs' => {
                                                                                                                                                                                                                                                      'join_type' => 'LEFT',
                                                                                                                                                                                                                                                      'cascade_copy' => 1,
                                                                                                                                                                                                                                                      'cascade_delete' => 1,
                                                                                                                                                                                                                                                      'accessor' => 'multi'
                                                                                                                                                                                                                                                    },
                                                                                                                                                                                                                                         'class' => 'LBBWCompliance::Model::LBBWComplianceData::UserRoles'
                                                                                                                                                                                                                                       }
                                                                                                                                                                                                                      },
                                                                                                                                                                                                  '_columns_info_loaded' => 1,
                                                                                                                                                                                                  '_ordered_columns' => [
                                                                                                                                                                                                                          'RoleID',
                                                                                                                                                                                                                          'RoleCode',
                                                                                                                                                                                                                          'RoleDesc'
                                                                                                                                                                                                                        ],
                                                                                                                                                                                                  '_primaries' => [
                                                                                                                                                                                                                    'RoleID'
                                                                                                                                                                                                                  ],
                                                                                                                                                                                                  '_resultset' => undef,
                                                                                                                                                                                                  'resultset_class' => 'DBIx::Class::ResultSet',
                                                                                                                                                                                                  '_unique_constraints' => {
                                                                                                                                                                                                                             'primary' => $VAR1->{'user'}{'obj'}{'result_source'}{'schema'}{'source_registrations'}{'LBBWCompliance::Model::LBBWComplianceData::Roles'}{'_primaries'}
                                                                                                                                                                                                                           },
                                                                                                                                                                                                  '_columns' => {
                                                                                                                                                                                                                  'RoleID' => {},
                                                                                                                                                                                                                  'RoleDesc' => {},
                                                                                                                                                                                                                  'RoleCode' => {}
                                                                                                                                                                                                                }
                                                                                                                                                                                                }, 'DBIx::Class::ResultSource::Table' )
                                                                                                                                 },
                                                                                                       'storage' => bless( {
                                                                                                                             'debugfh' => bless( \*Symbol::GEN2, 'IO::File' ),
                                                                                                                             'cursor' => 'DBIx::Class::Storage::DBI::Cursor',
                                                                                                                             '_conn_pid' => 1592,
                                                                                                                             'transaction_depth' => 0,
                                                                                                                             'connect_info' => [
                                                                                                                                                 'dbi:ADO:Provider=SQLOLEDB;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=LBBWCompliance;Data Source=NYSRV2K08',
                                                                                                                                                 '',
                                                                                                                                                 '',
                                                                                                                                                 {
                                                                                                                                                   'AutoCommit' => 1
                                                                                                                                                 }
                                                                                                                                               ],
                                                                                                                             '_dbh' => bless( {}, 'DBI::db' ),
                                                                                                                             'debug' => 1,
                                                                                                                             '_sql_maker' => bless( {
                                                                                                                                                      'cmp' => '=',
                                                                                                                                                      'quote_char' => '',
                                                                                                                                                      'limit_dialect' => $VAR1->{'user'}{'obj'}{'result_source'}{'schema'}{'storage'}{'_dbh'},
                                                                                                                                                      'bindtype' => 'normal'
                                                                                                                                                    }, 'DBIC::SQL::Abstract' )
                                                                                                                           }, 'DBIx::Class::Storage::DBI' )
                                                                                                     }, 'DBIx::Class::Schema' ),
                                                                                  '_relationships' => {
                                                                                                        'UserRoles' => {
                                                                                                                         'cond' => {
                                                                                                                                     'foreign.employeeID' => 'self.employeeID'
                                                                                                                                   },
                                                                                                                         'source' => 'LBBWCompliance::Model::LBBWComplianceData::UserRoles',
                                                                                                                         'attrs' => {
                                                                                                                                      'join_type' => 'LEFT',
                                                                                                                                      'cascade_copy' => 1,
                                                                                                                                      'cascade_delete' => 1,
                                                                                                                                      'accessor' => 'multi'
                                                                                                                                    },
                                                                                                                         'class' => 'LBBWCompliance::Model::LBBWComplianceData::UserRoles'
                                                                                                                       }
                                                                                                      },
                                                                                  '_columns_info_loaded' => 1,
                                                                                  '_ordered_columns' => [
                                                                                                          'employeeID',
                                                                                                          'password'
                                                                                                        ],
                                                                                  '_primaries' => [
                                                                                                    'employeeID'
                                                                                                  ],
                                                                                  '_resultset' => undef,
                                                                                  'resultset_class' => 'DBIx::Class::ResultSet',
                                                                                  '_unique_constraints' => {
                                                                                                             'primary' => $VAR1->{'user'}{'obj'}{'result_source'}{'_primaries'}
                                                                                                           },
                                                                                  '_columns' => {
                                                                                                  'password' => {},
                                                                                                  'employeeID' => {}
                                                                                                }
                                                                                }, 'DBIx::Class::ResultSource::Table' ),
                                                      '_in_storage' => 1,
                                                      '_column_data' => {
                                                                          'password' => 'test',
                                                                          'employeeID' => 40
                                                                        }
                                                    }, 'LBBWCompliance::Model::LBBWComplianceData::Users' ),
                                    'store' => bless( {
                                                        'auth' => {
                                                                    'user_field' => [
                                                                                      'employeeID'
                                                                                    ],
                                                                    'catalyst_user_class' => 'Catalyst::Plugin::Authentication::Store::DBIC::User',
                                                                    'password_type' => 'clear',
                                                                    'password_field' => 'password',
                                                                    'password_hash_type' => 'SHA-1',
                                                                    'user_class' => bless( {
                                                                                             'cond' => undef,
                                                                                             'result_class' => 'LBBWCompliance::Model::LBBWComplianceData::Users',
                                                                                             'attrs' => {
                                                                                                          'seen_join' => {},
                                                                                                          'as' => [
                                                                                                                    'employeeID',
                                                                                                                    'password'
                                                                                                                  ],
                                                                                                          'from' => [
                                                                                                                      {
                                                                                                                        'me' => 'Users'
                                                                                                                      }
                                                                                                                    ],
                                                                                                          'collapse' => {},
                                                                                                          'order_by' => [],
                                                                                                          'alias' => 'me',
                                                                                                          'select' => [
                                                                                                                        'me.employeeID',
                                                                                                                        'me.password'
                                                                                                                      ]
                                                                                                        },
                                                                                             'count' => undef,
                                                                                             'page' => undef,
                                                                                             'from' => $VAR1->{'user'}{'store'}{'auth'}{'user_class'}{'attrs'}{'from'},
                                                                                             'result_source' => $VAR1->{'user'}{'obj'}{'result_source'},
                                                                                             'collapse' => $VAR1->{'user'}{'store'}{'auth'}{'user_class'}{'attrs'}{'collapse'},
                                                                                             'pager' => undef
                                                                                           }, 'DBIx::Class::ResultSet' )
                                                                  },
                                                        'authz' => {
                                                                     'role_rel' => 'UserRoles',
                                                                     'role_class' => bless( {
                                                                                              'cond' => undef,
                                                                                              'result_class' => 'LBBWCompliance::Model::LBBWComplianceData::Roles',
                                                                                              'attrs' => {
                                                                                                           'seen_join' => {},
                                                                                                           'as' => [
                                                                                                                     'RoleID',
                                                                                                                     'RoleCode',
                                                                                                                     'RoleDesc'
                                                                                                                   ],
                                                                                                           'from' => [
                                                                                                                       {
                                                                                                                         'me' => 'Roles'
                                                                                                                       }
                                                                                                                     ],
                                                                                                           'collapse' => {},
                                                                                                           'order_by' => [],
                                                                                                           'alias' => 'me',
                                                                                                           'select' => [
                                                                                                                         'me.RoleID',
                                                                                                                         'me.RoleCode',
                                                                                                                         'me.RoleDesc'
                                                                                                                       ]
                                                                                                         },
                                                                                              'count' => undef,
                                                                                              'page' => undef,
                                                                                              'from' => $VAR1->{'user'}{'store'}{'authz'}{'role_class'}{'attrs'}{'from'},
                                                                                              'result_source' => $VAR1->{'user'}{'obj'}{'result_source'}{'schema'}{'source_registrations'}{'LBBWCompliance::Model::LBBWComplianceData::Roles'},
                                                                                              'collapse' => $VAR1->{'user'}{'store'}{'authz'}{'role_class'}{'attrs'}{'collapse'},
                                                                                              'pager' => undef
                                                                                            }, 'DBIx::Class::ResultSet' ),
                                                                     'role_field' => 'RoleCode',
                                                                     'user_role_user_field' => 'employeeID',
                                                                     'user_role_role_field' => 'RoleCode'
                                                                   }
                                                      }, 'Catalyst::Plugin::Authentication::Store::DBIC::Backend' ),
                                    'config' => {
                                                  'authz' => $VAR1->{'user'}{'store'}{'authz'},
                                                  'auth' => $VAR1->{'user'}{'store'}{'auth'}
                                                },
                                    'id' => '40'
                                  }, 'Catalyst::Plugin::Authentication::Store::DBIC::User' ),
                 'method' => 'POST',
                 'address' => '192.168.1.114',
                 'base' => bless( do{\(my $o = 'http://ny500337:3000/')}, 'URI::http' ),
                 'cookies' => {},
                 'match' => 'authentication/login',
                 'path' => 'authentication/login',
                 'uri' => bless( do{\(my $o = 'http://ny500337:3000/authentication/login')}, 'URI::http' ),
                 'query_parameters' => {},
                 'parameters' => {
                                   'password' => 'test',
                                   'employeeID' => '40',
                                   'submit' => 'Submit'
                                 },
                 'action' => 'authentication/login',
                 'arguments' => []
               }, 'Catalyst::Request' )

Response

bless( {
                 'body' => '<!-- Begin LBBW Header template -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
   <title>LBBWCompliance</title>
   <meta http-equiv="Content-type" content="text/html; charset=iso-8859-1" />
   <link rel="stylesheet" href="/css/LBBWStyle.css"  type="text/css" />
  
      <link rel="stylesheet" href="/css/login.css" type="text/css" />
  
</head>
<body>
<div class="header">
  <table class="headerTable">
   <tr>
     <td class="headerTableData" colspan="3">
       <img width="185" height="23" id="_x0000_i1025"
        src="/static/images/lbbwny_simple_mid.gif" align=absBottom border=0 />&nbsp;
     </td>
   </tr>
   <tr>
     <td class="headerTableDataAppName">
       LBBW Compliance
     </td>
     <td class="headerTableDataScreenName">
       &lt Log In &gt
     </td>
     <td class="headerTableDataUserName">
        Adams IV, William
     </td>
   </tr>
  </table>
  <br /><br />
</div> <!-- class="header -->
<!--   End LBBW Header Template -->




<!-- $VAR1 = [<br>
          bless( {<br>
                   \'result_source\' =&gt; bless( {<br>
                                               \'resultset_attributes\' =&gt; {},<br>
                                               \'result_class\' =&gt; \'LBBWCompliance::Model::humanResources::usr_Employees\',<br>
                                               \'name\' =&gt; \'usr_Employees\',<br>
                                               \'schema\' =&gt; \'LBBWCompliance::Model::humanResources\',<br>
                                               \'_relationships\' =&gt; {},<br>
                                               \'_columns_info_loaded\' =&gt; 0,<br>
                                               \'_ordered_columns\' =&gt; [<br>
                                                                       \'[Employee ID]\',<br>
                                                                       \'[Payroll Number]\',<br>
                                                                       \'[Employee Last Name]\',<br>
                                                                       \'[Employee First Name]\',<br>
                                                                       \'[Employee SSN]\',<br>
                                                                       \'[ADP]\',<br>
                                                                       \'[Head Office Employee No]\',<br>
                                                                       \'[Employee Date of Birth]\',<br>
                                                                       \'[E-mail]\',<br>
                                                                       \'[Address1]\',<br>
                                                                       \'[Address2]\',<br>
                                                                       \'[City]\',<br>
                                                                       \'[State]\',<br>
                                                                       \'[Zipcode]\',<br>
                                                                       \'[Country]\',<br>
                                                                       \'[Name of Next of Kin]\',<br>
                                                                       \'[Telephone Number of NOK]\',<br>
                                                                       \'[Relationship to NOK]\',<br>
                                                                       \'[Date of Employment]\',<br>
                                                                       \'[Department]\',<br>
                                                                       \'[Title]\',<br>
                                                                       \'[Function]\',<br>
                                                                       \'[Telephone]\',<br>
                                                                       \'[Business Phone]\',<br>
                                                                       \'[Phone Extension]\',<br>
                                                                       \'[Business Cell Phone]\',<br>
                                                                       \'[Vacation Limit]\',<br>
                                                                       \'[Termination Date]\',<br>
                                                                       \'[NT Login Name]\'<br>
                                                                     ],<br>
                                               \'_primaries\' =&gt; [<br>
                                                                 \'[Employee ID]\'<br>
                                                               ],<br>
                                               \'_resultset\' =&gt; undef,<br>
                                               \'resultset_class\' =&gt; \'DBIx::Class::ResultSet\',<br>
                                               \'_unique_constraints\' =&gt; {<br>
                                                                          \'primary\' =&gt; $VAR1-&gt;[0]{\'result_source\'}{\'_primaries\'}<br>
                                                                        },<br>
                                               \'_columns\' =&gt; {<br>
                                                               \'[Employee Last Name]\' =&gt; {},<br>
                                                               \'[State]\' =&gt; {},<br>
                                                               \'[Function]\' =&gt; {},<br>
                                                               \'[Address2]\' =&gt; {},<br>
                                                               \'[Business Phone]\' =&gt; {},<br>
                                                               \'[Head Office Employee No]\' =&gt; {},<br>
                                                               \'[Payroll Number]\' =&gt; {},<br>
                                                               \'[City]\' =&gt; {},<br>
                                                               \'[Employee First Name]\' =&gt; {},<br>
                                                               \'[Employee Date of Birth]\' =&gt; {},<br>
                                                               \'[Name of Next of Kin]\' =&gt; {},<br>
                                                               \'[Employee SSN]\' =&gt; {},<br>
                                                               \'[Zipcode]\' =&gt; {},<br>
                                                               \'[Termination Date]\' =&gt; {},<br>
                                                               \'[Address1]\' =&gt; {},<br>
                                                               \'[Department]\' =&gt; {},<br>
                                                               \'[Business Cell Phone]\' =&gt; {},<br>
                                                               \'[Date of Employment]\' =&gt; {},<br>
                                                               \'[E-mail]\' =&gt; {},<br>
                                                               \'[Phone Extension]\' =&gt; {},<br>
                                                               \'[Relationship to NOK]\' =&gt; {},<br>
                                                               \'[Telephone Number of NOK]\' =&gt; {},<br>
                                                               \'[Vacation Limit]\' =&gt; {},<br>
                                                               \'[ADP]\' =&gt; {},<br>
                                                               \'[NT Login Name]\' =&gt; {},<br>
                                                               \'[Telephone]\' =&gt; {},<br>
                                                               \'[Employee ID]\' =&gt; {},<br>
                                                               \'[Title]\' =&gt; {},<br>
                                                               \'[Country]\' =&gt; {}<br>
                                                             }<br>
                                             }, \'DBIx::Class::ResultSource::Table\' ),<br>
                   \'_in_storage\' =&gt; 1,<br>
                   \'_column_data\' =&gt; {<br>
                                       \'TerminationDate\' =&gt; undef,<br>
                                       \'EmployeeLastName\' =&gt; \'Adams IV\',<br>
                                       \'EmployeeFirstName\' =&gt; \'William\',<br>
                                       \'EmployeeID\' =&gt; 40<br>
                                     }<br>
                 }, \'LBBWCompliance::Model::humanResources::usr_Employees\' ),<br>
<Employee data deleted>

       ];<br>
 -->

<div class="login_area">

   <h2>Successful login for \'Adams IV, William\'.</h2>
 
<form action="/authentication/login" method="post">
  <span class="loginTitles">
    <div class="row">
       <span class="label"><h1>Please Log In:</h1></span>
    </div>
    <div class="row">
      <span class="label">User Name:</span>
      <span class="formControls">    
        <select name="employeeID">
          
              
                 
           <option value="40" selected>
              Adams IV
              , William
           </option>
       
              
   <other employee data deleted>              
          
        </select>
       
      </span> <!-- class="formControls" -->    
    </div> <!-- class="row" -->
    <div class="row">
       <span class="label">Password:</span>
       <span class="formControls">
          <input type="password" name="password" />
       </span>
    </div> <!-- class="row"  -->
    <div class="loginButtons">
        <input type="submit" name="submit" value="Submit" />
<!--        <input type="submit" name="submit" value="Change Password" /> -->
        <input type="submit" name="submit" value="Create User" />          
    </div> <!-- class="loginButtons" -->
    <br>
  </span> <!-- class="loginTitles" -->
</form>
</div> <!-- class="login_area" -->


<!-- BEGIN LBBW Footer template -->
   <div id="footer">
   </div>
</body>
</html>
<!-- END LBBW Footer template -->',
                 'cookies' => {},
                 'headers' => bless( {
                                       'content-type' => 'text/html; charset=utf-8',
                                       'x-catalyst' => '5.65'
                                     }, 'HTTP::Headers' ),
                 'status' => 200
               }, 'Catalyst::Response' )

Stash

{
          'employeeFirstName' => 'William',
          'employeeLastName' => 'Adams IV',
          'employeeID' => '40',
          'template' => 'LBBWComplianceLogin.tt2',
          'HREmployees' => bless( {
                                    'cond' => {
                                                '[Termination Date]' => \'IS NULL'
                                              },
                                    'result_class' => 'LBBWCompliance::Model::humanResources::usr_Employees',
                                    'attrs' => {
                                                 'seen_join' => {},
                                                 'order_by' => [
                                                                 '[Employee Last Name]'
                                                               ],
                                                 'where' => $VAR1->{'HREmployees'}{'cond'},
                                                 'as' => [
                                                           'EmployeeID',
                                                           'EmployeeFirstName',
                                                           'EmployeeLastName',
                                                           'TerminationDate'
                                                         ],
                                                 'from' => [
                                                             {
                                                               'me' => 'usr_Employees'
                                                             }
                                                           ],
                                                 'collapse' => {},
                                                 'alias' => 'me',
                                                 'select' => [
                                                               '[Employee ID]',
                                                               '[Employee First Name]',
                                                               '[Employee Last Name]',
                                                               '[Termination Date]'
                                                             ]
                                               },
                                    'count' => undef,
                                    'cursor' => bless( {
                                                         'attrs' => {
                                                                      'seen_join' => $VAR1->{'HREmployees'}{'attrs'}{'seen_join'},
                                                                      'order_by' => $VAR1->{'HREmployees'}{'attrs'}{'order_by'},
                                                                      'where' => $VAR1->{'HREmployees'}{'cond'},
                                                                      'as' => $VAR1->{'HREmployees'}{'attrs'}{'as'},
                                                                      'from' => $VAR1->{'HREmployees'}{'attrs'}{'from'},
                                                                      'collapse' => $VAR1->{'HREmployees'}{'attrs'}{'collapse'},
                                                                      'alias' => 'me',
                                                                      'select' => $VAR1->{'HREmployees'}{'attrs'}{'select'}
                                                                    },
                                                         'pid' => 1592,
                                                         'args' => [
                                                                     $VAR1->{'HREmployees'}{'attrs'}{'from'},
                                                                     $VAR1->{'HREmployees'}{'attrs'}{'select'},
                                                                     $VAR1->{'HREmployees'}{'cond'},
                                                                     $VAR1->{'HREmployees'}{'cursor'}{'attrs'}
                                                                   ],
                                                         'pos' => 0,
                                                         'storage' => bless( {
                                                                               '_conn_pid' => 1592,
                                                                               'connect_info' => [
                                                                                                   'dbi:ADO:Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=HR;Data Source=NYSRV2K08',
                                                                                                   '',
                                                                                                   '',
                                                                                                   {
                                                                                                     'TraceLevel' => 0,
                                                                                                     'ShowErrorStatement' => 1,
                                                                                                     'RaiseError' => 1,
                                                                                                     'PrintError' => 0
                                                                                                   }
                                                                                                 ],
                                                                               'debugfh' => bless( \*Symbol::GEN1, 'IO::File' ),
                                                                               'transaction_depth' => 0,
                                                                               'cursor' => 'DBIx::Class::Storage::DBI::Cursor',
                                                                               '_dbh' => bless( {}, 'DBI::db' ),
                                                                               '_sql_maker' => bless( {
                                                                                                        'cmp' => '=',
                                                                                                        'quote_char' => '',
                                                                                                        'limit_dialect' => $VAR1->{'HREmployees'}{'cursor'}{'storage'}{'_dbh'},
                                                                                                        'bindtype' => 'normal'
                                                                                                      }, 'DBIC::SQL::Abstract' )
                                                                             }, 'DBIx::Class::Storage::DBI' )
                                                       }, 'DBIx::Class::Storage::DBI::Cursor' ),
                                    'page' => undef,
                                    'from' => $VAR1->{'HREmployees'}{'attrs'}{'from'},
                                    'result_source' => bless( {
                                                                'resultset_attributes' => {},
                                                                'result_class' => 'LBBWCompliance::Model::humanResources::usr_Employees',
                                                                'name' => 'usr_Employees',
                                                                'schema' => 'LBBWCompliance::Model::humanResources',
                                                                '_relationships' => {},
                                                                '_columns_info_loaded' => 0,
                                                                '_ordered_columns' => [
                                                                                        '[Employee ID]',
                                                                                        '[Payroll Number]',
                                                                                        '[Employee Last Name]',
                                                                                        '[Employee First Name]',
                                                                                        '[Employee SSN]',
                                                                                        '[ADP]',
                                                                                        '[Head Office Employee No]',
                                                                                        '[Employee Date of Birth]',
                                                                                        '[E-mail]',
                                                                                        '[Address1]',
                                                                                        '[Address2]',
                                                                                        '[City]',
                                                                                        '[State]',
                                                                                        '[Zipcode]',
                                                                                        '[Country]',
                                                                                        '[Name of Next of Kin]',
                                                                                        '[Telephone Number of NOK]',
                                                                                        '[Relationship to NOK]',
                                                                                        '[Date of Employment]',
                                                                                        '[Department]',
                                                                                        '[Title]',
                                                                                        '[Function]',
                                                                                        '[Telephone]',
                                                                                        '[Business Phone]',
                                                                                        '[Phone Extension]',
                                                                                        '[Business Cell Phone]',
                                                                                        '[Vacation Limit]',
                                                                                        '[Termination Date]',
                                                                                        '[NT Login Name]'
                                                                                      ],
                                                                '_primaries' => [
                                                                                  '[Employee ID]'
                                                                                ],
                                                                '_resultset' => undef,
                                                                'resultset_class' => 'DBIx::Class::ResultSet',
                                                                '_unique_constraints' => {
                                                                                           'primary' => $VAR1->{'HREmployees'}{'result_source'}{'_primaries'}
                                                                                         },
                                                                '_columns' => {
                                                                                '[Employee Last Name]' => {},
                                                                                '[State]' => {},
                                                                                '[Function]' => {},
                                                                                '[Address2]' => {},
                                                                                '[Business Phone]' => {},
                                                                                '[Head Office Employee No]' => {},
                                                                                '[Payroll Number]' => {},
                                                                                '[City]' => {},
                                                                                '[Employee First Name]' => {},
                                                                                '[Employee Date of Birth]' => {},
                                                                                '[Name of Next of Kin]' => {},
                                                                                '[Employee SSN]' => {},
                                                                                '[Zipcode]' => {},
                                                                                '[Termination Date]' => {},
                                                                                '[Address1]' => {},
                                                                                '[Department]' => {},
                                                                                '[Business Cell Phone]' => {},
                                                                                '[Date of Employment]' => {},
                                                                                '[E-mail]' => {},
                                                                                '[Phone Extension]' => {},
                                                                                '[Relationship to NOK]' => {},
                                                                                '[Telephone Number of NOK]' => {},
                                                                                '[Vacation Limit]' => {},
                                                                                '[ADP]' => {},
                                                                                '[NT Login Name]' => {},
                                                                                '[Telephone]' => {},
                                                                                '[Employee ID]' => {},
                                                                                '[Title]' => {},
                                                                                '[Country]' => {}
                                                                              }
                                                              }, 'DBIx::Class::ResultSource::Table' ),
                                    'collapse' => $VAR1->{'HREmployees'}{'attrs'}{'collapse'},
                                    'pager' => undef
                                  }, 'DBIx::Class::ResultSet' ),
          'loginMessage' => 'Successful login for \'Adams IV, William\'.'
        }

Session ID

'b782d2edb78226908344300be9541878'

Session

{
          '__user_store' => 'default',
          '__address' => '192.168.1.114',
          '__user' => '40',
          '__created' => 1151007723,
          '__expires' => 1151011324,
          '__updated' => 1151007724
        }

LBBWCompliance on Catalyst 5.65









More information about the Catalyst mailing list