<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi<div class=""><br class=""></div><div class="">Apologies for the length of this but I wanted to include everything I have tried.<br class=""><div class=""><br class=""></div><div class="">I have been using <font color="#000000" style="orphans: 2; white-space: nowrap; widows: 2; background-color: rgb(255, 255, 255); cursor: pointer;" class=""><a href="http://search.cpan.org/perldoc?Dancer2%3A%3APlugin%3A%3AAuth%3A%3AExtensible" style="orphans: 2; white-space: nowrap; widows: 2; background-color: rgb(255, 255, 255); cursor: pointer;" class="">Dancer2::Plugin::Auth::Extensible</a> for a while - all good.</font></div><div class=""><font color="#000000" style="orphans: 2; white-space: nowrap; widows: 2; background-color: rgb(255, 255, 255); cursor: pointer;" class=""><br class=""></font></div><div class=""><font color="#000000" style="orphans: 2; white-space: nowrap; widows: 2; background-color: rgb(255, 255, 255); cursor: pointer;" class="">I am now trying to use </font><a href="http://search.cpan.org/perldoc?Dancer2%3A%3APlugin%3A%3AAuth%3A%3AExtensible%3A%3AProvider%3A%3ADatabase" class="podlinkpod" style="background-color: rgb(255, 255, 255); color: rgb(0, 102, 153); font-variant-ligatures: normal; orphans: 2; widows: 2;">Dancer2::Plugin::Auth::Extensible::Provider::Database</a></div><div class="">thus</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">session: Cookie</span></div><div style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255); min-height: 14px;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">template: template_toolkit</span></div><div style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255); min-height: 14px;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">engines:</span></div><div style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> template:</span></div><div style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> template_toolkit:</span></div><div style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> start_tag: '<%'</span></div><div style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> stop_tag: '%>'</span></div><div style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> session:</span></div><div style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> Cookie:</span></div><div style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> secret_key: thisisverysecret!</span></div><div style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> default_duration: 604800</span></div><div style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255); min-height: 14px;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255); min-height: 14px;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""></span><br class=""></div><div style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">plugins:</span></div><div style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> Auth::Extensible:</span></div><div style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> disable_roles: 1</span></div><div style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> realms:</span></div><div style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> users:</span></div><div style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> provider: 'Database'</span></div><div style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> users_table: ot_users</span></div><div style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""># roles_table: ot_roles</span></div><div style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""># user_roles_table: ot_user_roles</span></div><div style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> Database:</span></div><div style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> dsn: "dbi:Informix:ehive_support2012"</span></div><div style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> #driver: 'Informix'</span></div><div style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> #database: 'ehive_support2012'</span></div><div style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> username: *******</span></div><div style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> password: *******</span></div><div style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> log_queries: 1</span></div><div style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> on_connect_do: ['set explain on']</span></div><div style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> dbi_params:</span></div><div style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> PrintError: 0</span></div><div style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> RaiseError: 1</span></div></div><div style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> AutoCommit: 1</span></div><div style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">Once I got past the db connection errors I added and entry in the ot_users table for me using </span></div><div style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> </span>create_user username => "clive", email => '<a href="mailto:clive@hildebrand.co.uk" class="">clive@hildebrand.co.uk</a>', email_welcome => 0;</div><div style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);" class="">and</div><div style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);" class=""><div style="margin: 0px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><span class="Apple-tab-span" style="white-space:pre"> </span>user_password username => 'clive', new_password => 'secret';</span></div></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div class="">And indeed I can manually run</div><div class=""><span style="background-color: rgb(255, 255, 255);" class="">SELECT * FROM "ot_users" WHERE "username”=‘clive</span>’</div><div class=""><span style="background-color: rgb(255, 255, 255);" class="">and it works</span></div><div class=""><span style="background-color: rgb(255, 255, 255);" class=""><br class=""></span></div><div class=""><span style="background-color: rgb(255, 255, 255);" class="">In addition the following test program also works</span></div><div class=""><span style="background-color: rgb(255, 255, 255);" class=""><br class=""></span></div><div class=""><div style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);" class=""><div style="margin: 0px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">#!/usr/bin/env perl</span></div><div style="margin: 0px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">use DBI;</span></div><div style="margin: 0px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">use Data::Dumper;</span></div><div style="margin: 0px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">my $dbh_support = DBI-> connect("dbi:Informix:ehive_support2012", ‘*******' , ‘*******', { RaiseError=> 0, AutoCommit => 1, PrintError => 1, PrintWarn => 1}) or die("Connect failed $DBI::errstr");</span></div><div style="margin: 0px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">$sel = $dbh_support->prepare(qq(SELECT * FROM "ot_users" WHERE "username"=?));</span></div><div style="margin: 0px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">$sel->execute('clive');</span></div><div style="margin: 0px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">my $a = $sel->fetchrow_hashref;</span></div><div style="margin: 0px; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">print Dumper($a);</span></div></div></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class="">producing </span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><div style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">$VAR1 = {</span></div><div style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> 'password' => '{SSHA512}Jr34UXRpsaCQSWsJJE/Qq84fpq6RBVi',</span></div><div style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> 'email' => '<a href="mailto:clive@hildebrand.co.uk" class="">clive@hildebrand.co.uk</a>',</span></div><div style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> 'pw_reset_code' => 'Ct1FIiUkwdiLSRVYUQCOyQYEquSV5RRe',</span></div><div style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> 'username' => 'clive',</span></div><div style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> 'id' => '3',</span></div><div style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> 'hid' => undef</span></div><div style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""> };</span></div><div style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div></span></div><div class=""><span style="background-color: rgb(255, 255, 255);" class=""><br class=""></span></div><div class=""><span style="background-color: rgb(255, 255, 255);" class="">However the login is failing and I am just returned to the login screen with the banner set to </span><span style="color: rgb(51, 51, 51); orphans: 2; widows: 2; background-color: rgb(221, 221, 221);" class="">LOGIN FAILED</span></div><div class=""><span style="background-color: rgb(255, 255, 255);" class=""><br class=""></span></div><div class=""><span style="background-color: rgb(255, 255, 255);" class="">There is no indication WHAT is failing - can anyone suggest either what is wrong or where I can add debug - I have tried with and without roles.</span></div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><div style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">[otweb:22772] core @2017-11-23 10:10:22> looking for post /login in /root/perl5/perlbrew/perls/perl-5.24.1/lib/site_perl/5.24.1/Dancer2/Core/App.pm l. 35</span></div><div style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">[otweb:22772] core @2017-11-23 10:10:22> Entering hook core.app.before_request in (eval 718) l. 1</span></div><div style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">[otweb:22772] core @2017-11-23 10:10:22> Entering hook plugin.auth_extensible.before_authenticate_user in (eval 718) l. 1</span></div><div style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">[otweb:22772] debug @2017-11-23 10:10:22> Attempting to authenticate clive against realm users in /root/perl5/perlbrew/perls/perl-5.24.1/lib/site_perl/5.24.1/Dancer2/Core/Route.pm l. 140</span></div><div style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">[otweb:22772] core @2017-11-23 10:10:22> Entering hook plugin.database.database_connected in (eval 718) l. 1</span></div><div style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">[otweb:22772] debug @2017-11-23 10:10:22> Executing SELECT query SELECT * FROM "ot_users" WHERE "username"=? with params clive in /root/perl5/perlbrew/perls/perl-5.24.1/lib/site_perl/5.24.1/Dancer2/Plugin.pm l. 532</span></div><div style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">[otweb:22772] core @2017-11-23 10:10:22> Entering hook plugin.auth_extensible.after_authenticate_user in (eval 718) l. 1</span></div><div style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">[otweb:22772] core @2017-11-23 10:10:22> looking for get /login in /root/perl5/perlbrew/perls/perl-5.24.1/lib/site_perl/5.24.1/Dancer2/Core/App.pm l. 35</span></div><div style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">[otweb:22772] core @2017-11-23 10:10:22> Entering hook core.app.before_request in (eval 718) l. 1</span></div><div style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">[otweb:22772] debug @2017-11-23 10:10:22> app has no login template defined in /root/perl5/perlbrew/perls/perl-5.24.1/lib/site_perl/5.24.1/Dancer2/Plugin/Auth/Extensible.pm l. 283</span></div><div style="margin: 0px; line-height: normal; background-color: rgb(255, 255, 255);" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">[otweb:22772] core @2017-11-23 10:10:22> Entering hook core.app.after_request in (eval 718) l. 1</span></div><div class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class=""></span></div><div class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">--<br class="">Clive Eisen<br class="">GPG: 3818B5F1<br class=""><br class=""><br class=""><br class=""><br class=""><br class=""></div>
</div>
<br class=""></div></div></body></html>