Catalyst::Plugin::Session::State::Header - Manipulate session IDs by auth headers.
use Catalyst qw/Session Session::State::Header Session::Store::Foo/; ...; __PACKAGE__->config('Plugin::Session' => { auth_header => 'x-auth', allowed_uri => '^/api/', });
In order for Catalyst::Plugin::Session to work the session data needs to be stored on the server. To link session on server with client we need to pass somehow session_id to the server, and server should accept it.
This plugin accepts session_id using headers. It is usable for APIs, when we need to path auth information in the headers, for example, in x-auth header.
Header name, in which authentication info should be passed. For example, x-auth.
Regexp for URI validation. If specified, this plugin will be enabled only for paths matched by regexp that was provided. Otherwise, all URIs will be affected.
Returns unified catalyst path with heading and ending slashes and withoud slash repetitions. Catalyst path ($c->request->path()) returns controller path as is, so, it path could be: api///login/ api/login api/login///
But for catalyst these paths are the same, so, this method will return /api/login/ for each of them.
Catalyst Catalyst::Plugin::Session Catalyst::Plugin::Session::State::Cookie Catalyst::Plugin::Session::State::URI
This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself.
To install Catalyst::Plugin::Session::State::Header, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Catalyst::Plugin::Session::State::Header
CPAN shell
perl -MCPAN -e shell install Catalyst::Plugin::Session::State::Header
For more information on module installation, please visit the detailed CPAN module installation guide.