[dancer-users] Dancer2::Plugin::Auth::Extensible

Stefan Hornburg (Racke) racke at linuxia.de
Mon Dec 22 09:47:14 GMT 2014


On 12/21/2014 11:25 PM, Alex Khrenov wrote:
> Hello.
> Tried to use this plugin with Database provider, but received on POST login page:
> 
> 
>   Error 500 - Internal Server Error
> 
> Cannot load provider Dancer2::Plugin::Auth::Extensible::Provider::Database: Can't use string ("Dancer2::Core::Role::DSL") as a HASH ref while "strict refs" in use at (eval 168) line 48. BEGIN failed--compilation aborted at /usr/local/lib/perl5/site_perl/Dancer2/Plugin/Database.pm line 8. Compilation failed in require at /usr/local/lib/perl5/site_perl/Dancer2/Plugin/Auth/Extensible/Provider/Database.pm line 5. BEGIN failed--compilation aborted at /usr/local/lib/perl5/site_perl/Dancer2/Plugin/Auth/Extensible/Provider/Database.pm line 5. Compilation failed in require at /usr/local/lib/perl5/site_perl/Dancer2/Plugin/Auth/Extensible.pm line 547.
> Powered by Dancer2 <http://perldancer.org/> 0.157000
> 
> Config:
> 
> plugins:
>   Database:
>     driver: 'mysql'
>     database: 'dbname'
>     host: 'x.x.x.x'
>     username: 'user'
>     password: 'password'
>     connection_check_threshold: 10
>     dbi_params:
>       RaiseError: 1
>       AutoCommit: 1
>     on_connect_do: ["SET NAMES 'utf8'", "SET CHARACTER SET 'utf8'" ]
>   Auth::Extensible:
>     login_page: /user/login
>     logout_page: /user/logout
>     denied_page: /user/denied
>     realms:
>       clients:
>         provider: 'Database'
>         users_table: 'client'
>         users_username_column: 'email'
>         user_roles_role_id_column: 'role_id'
>       staff:
>         provider: 'Database'
>         users_table: 'staff'
>         users_username_column: 'email'
>         user_roles_role_id_column: 'role_id'
> 
> Where am i mistaken?

It's not your fault ...

See: https://github.com/racke/Dancer2-Plugin-Auth-Extensible/issues/4

Probably related to Dancer2 plugin architecture bugs.

Regards
	Racke


-- 
Modern Perl, Dancer and eCommerce consulting.


More information about the dancer-users mailing list