From d4d8f1ba1bd6890a0aa1cc8004c6f41bd1292dc4 Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Thu, 15 Apr 2021 10:31:41 -0400 Subject: [PATCH] Plugin::Authentication config: modernize Some time in the last decade the plugin switched to preferring a flatter namespace for realm config. Co-authored-by: Graham Christensen --- src/lib/Hydra.pm | 35 +++++++++++++++++------------------ 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/src/lib/Hydra.pm b/src/lib/Hydra.pm index 6d204431..a90235b8 100644 --- a/src/lib/Hydra.pm +++ b/src/lib/Hydra.pm @@ -27,27 +27,26 @@ our $VERSION = '0.01'; __PACKAGE__->config( name => 'Hydra', default_view => "TT", - authentication => { + 'Plugin::Authentication' => { default_realm => "dbic", - realms => { - dbic => { - credential => { - class => "Password", - password_field => "password", - password_type => "hashed", - password_hash_type => "SHA-1", - }, - store => { - class => "DBIx::Class", - user_class => "DB::Users", - role_relation => "userroles", - role_field => "role", - }, + + dbic => { + credential => { + class => "Password", + password_field => "password", + password_type => "hashed", + password_hash_type => "SHA-1", + }, + store => { + class => "DBIx::Class", + user_class => "DB::Users", + role_relation => "userroles", + role_field => "role", }, - ldap => $ENV{'HYDRA_LDAP_CONFIG'} ? LoadFile( - file($ENV{'HYDRA_LDAP_CONFIG'}) - ) : undef }, + ldap => $ENV{'HYDRA_LDAP_CONFIG'} ? LoadFile( + file($ENV{'HYDRA_LDAP_CONFIG'}) + ) : undef }, 'Plugin::Static::Simple' => { send_etag => 1,