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 <graham@grahamc.com>
This commit is contained in:
Graham Christensen 2021-04-15 10:31:41 -04:00 committed by Graham Christensen
parent b9bcedbfdb
commit d4d8f1ba1b

View file

@ -27,27 +27,26 @@ our $VERSION = '0.01';
__PACKAGE__->config( __PACKAGE__->config(
name => 'Hydra', name => 'Hydra',
default_view => "TT", default_view => "TT",
authentication => { 'Plugin::Authentication' => {
default_realm => "dbic", default_realm => "dbic",
realms => {
dbic => { dbic => {
credential => { credential => {
class => "Password", class => "Password",
password_field => "password", password_field => "password",
password_type => "hashed", password_type => "hashed",
password_hash_type => "SHA-1", password_hash_type => "SHA-1",
}, },
store => { store => {
class => "DBIx::Class", class => "DBIx::Class",
user_class => "DB::Users", user_class => "DB::Users",
role_relation => "userroles", role_relation => "userroles",
role_field => "role", 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' => { 'Plugin::Static::Simple' => {
send_etag => 1, send_etag => 1,