Re: [dancer-users] Dancer2::Plugin::Auth::Extensible with DB
And in support of Andy's comments below - I put a debug warn statement at the start of each sub in Extensible.pm and Database.pm to work out where things weren't working. Also turn up your logging to get the 'debug' level reports from DPAE into your logs. On 23 November 2017 at 22:10, Andrew Beverley <andy@andybev.com> wrote:
On Thu, 23 Nov 2017 10:28:31 +0000 Clive Eisen wrote:
However the login is failing and I am just returned to the login screen with the banner set to LOGIN FAILED
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.
I would start by hacking some debug statements directly into the authenticate_user() subroutine in Provider/Database.pm
That function should be called by DPAE, so you can check firstly that it's actually being called, and secondly if/what/why it's returning a failure (assuming it is).
Andy _______________________________________________ dancer-users mailing list dancer-users@dancer.pm http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
Good call chaps I have tracked it down to Trying CRYPTED validate with {SSHA512}+pCMXZt0RWx/lE/ggcoOJWEUheG9yKiHKLzOUqb1/GJQjyXMgeO3yy1Z4b6meNyavTqAxDJpsS3HuPcTpVeDofi6ilo, secret at /root/perl5/perlbrew/perls/perl-5.24.1/lib/site_perl/5.24.1/Dancer2/Plugin/Auth/Extensible/Role/Provider.pm line 85. +pCMXZt0RWx/lE/ggcoOJWEUheG9yKiHKLzOUqb1/GJQjyXMgeO3yy1Z4b6meNyavTqAxDJpsS3HuPcTpVeDofi6ilo= eq +pCMXZt0RWx/lE/ggcoOJWEUheG9yKiHKLzOUqb1/GJQjyXMgeO3yy1Z4b6meNyavTqAxDJpsS3HuPcTpVeDofi6ilo at /root/perl5/perlbrew/perls/perl-5.24.1/lib/site_perl/5.24.1/Crypt/SaltedHash.pm line 308. So the original in DB password is padded %4 with = (as it should be) and the freshly encyrpted one is not I will try and figure out why -- Clive Eisen GPG: 3818B5F1
On 23 Nov 2017, at 11:41, Nathan Bailey <web@polynate.net> wrote:
And in support of Andy's comments below - I put a debug warn statement at the start of each sub in Extensible.pm and Database.pm to work out where things weren't working. Also turn up your logging to get the 'debug' level reports from DPAE into your logs.
On 23 November 2017 at 22:10, Andrew Beverley <andy@andybev.com <mailto:andy@andybev.com>> wrote: On Thu, 23 Nov 2017 10:28:31 +0000 Clive Eisen wrote:
However the login is failing and I am just returned to the login screen with the banner set to LOGIN FAILED
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.
I would start by hacking some debug statements directly into the authenticate_user() subroutine in Provider/Database.pm
That function should be called by DPAE, so you can check firstly that it's actually being called, and secondly if/what/why it's returning a failure (assuming it is).
Andy _______________________________________________ dancer-users mailing list dancer-users@dancer.pm <mailto:dancer-users@dancer.pm> http://lists.preshweb.co.uk/mailman/listinfo/dancer-users <http://lists.preshweb.co.uk/mailman/listinfo/dancer-users>
_______________________________________________ dancer-users mailing list dancer-users@dancer.pm http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
And solved It’s more of a documentation issue. The default encryption is now SHA512 - which with MD5 and the {SSHA512} on the front needs 101 bytes for the password in the db I have only seen references to varchar(40) for the password - I had it set to 100 (doh!) On the plus side I have it working with Informix - I will do a separate note about the hoops you have to jump through for that. Sorry for the noise Regards -- Clive Eisen GPG: 3818B5F1
On 23 Nov 2017, at 12:51, Clive Eisen <clive@hildebrand.co.uk> wrote:
Good call chaps
I have tracked it down to
Trying CRYPTED validate with {SSHA512}+pCMXZt0RWx/lE/ggcoOJWEUheG9yKiHKLzOUqb1/GJQjyXMgeO3yy1Z4b6meNyavTqAxDJpsS3HuPcTpVeDofi6ilo, secret at /root/perl5/perlbrew/perls/perl-5.24.1/lib/site_perl/5.24.1/Dancer2/Plugin/Auth/Extensible/Role/Provider.pm line 85.
+pCMXZt0RWx/lE/ggcoOJWEUheG9yKiHKLzOUqb1/GJQjyXMgeO3yy1Z4b6meNyavTqAxDJpsS3HuPcTpVeDofi6ilo=
eq
+pCMXZt0RWx/lE/ggcoOJWEUheG9yKiHKLzOUqb1/GJQjyXMgeO3yy1Z4b6meNyavTqAxDJpsS3HuPcTpVeDofi6ilo
at /root/perl5/perlbrew/perls/perl-5.24.1/lib/site_perl/5.24.1/Crypt/SaltedHash.pm line 308.
So the original in DB password is padded %4 with = (as it should be) and the freshly encyrpted one is not
I will try and figure out why
-- Clive Eisen GPG: 3818B5F1
On 23 Nov 2017, at 11:41, Nathan Bailey <web@polynate.net <mailto:web@polynate.net>> wrote:
And in support of Andy's comments below - I put a debug warn statement at the start of each sub in Extensible.pm and Database.pm to work out where things weren't working. Also turn up your logging to get the 'debug' level reports from DPAE into your logs.
On 23 November 2017 at 22:10, Andrew Beverley <andy@andybev.com <mailto:andy@andybev.com>> wrote: On Thu, 23 Nov 2017 10:28:31 +0000 Clive Eisen wrote:
However the login is failing and I am just returned to the login screen with the banner set to LOGIN FAILED
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.
I would start by hacking some debug statements directly into the authenticate_user() subroutine in Provider/Database.pm
That function should be called by DPAE, so you can check firstly that it's actually being called, and secondly if/what/why it's returning a failure (assuming it is).
Andy _______________________________________________ dancer-users mailing list dancer-users@dancer.pm <mailto:dancer-users@dancer.pm> http://lists.preshweb.co.uk/mailman/listinfo/dancer-users <http://lists.preshweb.co.uk/mailman/listinfo/dancer-users>
_______________________________________________ dancer-users mailing list dancer-users@dancer.pm <mailto:dancer-users@dancer.pm> http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
_______________________________________________ dancer-users mailing list dancer-users@dancer.pm http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
participants (2)
-
Clive Eisen -
Nathan Bailey