The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Dancer2::Plugin::Auth::Extensible::Provider::Base - base class for authentication providers

DESCRIPTION

Base class for authentication providers. Provides a constructor which handles receiving the realm settings and returning an instance of the provider.

Also provides secure password matching which automatically handles crypted passwords via Crypt::SaltedHash.

Finally, provides the methods which providers must override with their implementation, which will die if they are not overridden.

METHODS SUPPLIED BY BASE PROVIDER

new

realm_settings

Accessor for realm settings.

realm_dsl

Accessor for realm DSL object.

match_password($given, $correct)

Matches $given password with the $correct one.

encrypt_password($password, $algorithm)

Encrypts password $password with $algorithm which defaults to SHA-1.

METHODS IMPLEMENTED BY PROVIDER

authenticate_user

get_user_details

set_user_details

get_user_roles

set_user_password

password_expired