Convos::Plugin::Auth::Header - Authenticate users by verifying reverse proxy header
SYNOPSIS
$ CONVOS_PLUGINS=Convos::Plugin::Auth::Header \
[email protected] \
CONVOS_AUTH_HEADER=X-User \
./script/convos daemon
CONVOS_ADMIN
defaults to [email protected]
, but can be set to the Convos admin user's email address to disallow anyone else to register as a normal user before the admin has registered/logged in. Setting this enviroment variable to an empty string will make the first user the admin user.
CONVOS_AUTH_HEADER
must contain the header name that will contain the email address of the logged in user. The default value is "X-Authenticated-User", but can be set to "X-User" or any value you like. Do make sure though that this header cannot be set from user request!
DESCRIPTION
Convos::Plugin::Auth::Header is used to register and login users based on a header set in a reverse proxy web server, such as nginx.
HELPERS
user.load_p
$user = await $c->user->load_p;
See "user.load_p" in Convos::Plugin::Auth for details.
METHODS
register
$auth->register($app, \%config);