Dancer-Session-Cookie
view release on metacpan or search on metacpan
}
},
"develop" : {
"requires" : {
"Test::More" : "0.96",
"Test::Vars" : "0"
}
},
"runtime" : {
"requires" : {
"Crypt::CBC" : "0",
"Crypt::Rijndael" : "0",
"Dancer" : "1.3113",
"Dancer::Cookie" : "0",
"Dancer::Cookies" : "0",
"Dancer::Session::Abstract" : "0",
"MIME::Base64" : "0",
"PerlX::Maybe" : "0",
"Session::Storage::Secure" : "0.010",
"Storable" : "0",
"String::CRC32" : "0",
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
version: '1.4'
name: Dancer-Session-Cookie
provides:
Dancer::Session::Cookie:
file: lib/Dancer/Session/Cookie.pm
version: '0.30'
requires:
Crypt::CBC: '0'
Crypt::Rijndael: '0'
Dancer: '1.3113'
Dancer::Cookie: '0'
Dancer::Cookies: '0'
Dancer::Session::Abstract: '0'
MIME::Base64: '0'
PerlX::Maybe: '0'
Session::Storage::Secure: '0.010'
Storable: '0'
String::CRC32: '0'
Makefile.PL view on Meta::CPAN
"ABSTRACT" => "Encrypted cookie-based session backend for Dancer",
"AUTHOR" => "Alex Kapranoff <kappa\@cpan.org>, Alex Sukria <sukria\@cpan.org>, David Golden <dagolden\@cpan.org>, Yanick Champoux <yanick\@cpan.org>",
"CONFIGURE_REQUIRES" => {
"ExtUtils::MakeMaker" => 0
},
"DISTNAME" => "Dancer-Session-Cookie",
"LICENSE" => "perl",
"MIN_PERL_VERSION" => "5.010000",
"NAME" => "Dancer::Session::Cookie",
"PREREQ_PM" => {
"Crypt::CBC" => 0,
"Crypt::Rijndael" => 0,
"Dancer" => "1.3113",
"Dancer::Cookie" => 0,
"Dancer::Cookies" => 0,
"Dancer::Session::Abstract" => 0,
"MIME::Base64" => 0,
"PerlX::Maybe" => 0,
"Session::Storage::Secure" => "0.010",
"Storable" => 0,
"String::CRC32" => 0,
Makefile.PL view on Meta::CPAN
"Test::Requires" => 0
},
"VERSION" => "0.30",
"test" => {
"TESTS" => "t/*.t"
}
);
my %FallbackPrereqs = (
"Crypt::CBC" => 0,
"Crypt::Rijndael" => 0,
"Dancer" => "1.3113",
"Dancer::Cookie" => 0,
"Dancer::Cookies" => 0,
"Dancer::ModuleLoader" => 0,
"Dancer::Session::Abstract" => 0,
"Dancer::Test" => 0,
"ExtUtils::MakeMaker" => 0,
"File::Spec" => 0,
"File::Temp" => 0,
README.mkdn view on Meta::CPAN
limit the size of a cookie to 4KB, but that includes the space taken to store
the cookie's name, expiration and other attributes as well as its content.
# CONFIGURATION
The setting **session** should be set to `cookie` in order to use this session
engine in a Dancer application. See [Dancer::Config](https://metacpan.org/pod/Dancer::Config).
Another setting is also required: **session\_cookie\_key**, which should
contain a random string of at least 16 characters (shorter keys are
not cryptographically strong using AES in CBC mode).
The optional **session\_expires** setting can also be passed,
which will provide the duration time of the cookie. If it's not present, the
cookie won't have an expiration value.
Here is an example configuration to use in your `config.yml`:
```
session: "cookie"
session_cookie_key: "kjsdf07234hjf0sdkflj12*&(@*jk"
README.mkdn view on Meta::CPAN
**session\_cookie\_path** can be used to control the path of the session
cookie. The default is `/`.
The global **session\_secure** setting is honored and a secure (https
only) cookie will be used if set.
# DEPENDENCY
This module depends on [Session::Storage::Secure](https://metacpan.org/pod/Session::Storage::Secure). Legacy support is provided
using [Crypt::CBC](https://metacpan.org/pod/Crypt::CBC), [Crypt::Rijndael](https://metacpan.org/pod/Crypt::Rijndael), [String::CRC32](https://metacpan.org/pod/String::CRC32), [Storable](https://metacpan.org/pod/Storable) and
[MIME::Base64](https://metacpan.org/pod/MIME::Base64).
# SEE ALSO
See [Dancer::Session](https://metacpan.org/pod/Dancer::Session) for details about session usage in route handlers.
See [Plack::Middleware::Session::Cookie](https://metacpan.org/pod/Plack::Middleware::Session::Cookie),
[Catalyst::Plugin::CookiedSession](https://metacpan.org/pod/Catalyst::Plugin::CookiedSession), ["session" in Mojolicious::Controller](https://metacpan.org/pod/Mojolicious::Controller#session) for alternative implementation of this mechanism.
# AUTHORS
requires "Crypt::CBC" => "0";
requires "Crypt::Rijndael" => "0";
requires "Dancer" => "1.3113";
requires "Dancer::Cookie" => "0";
requires "Dancer::Cookies" => "0";
requires "Dancer::Session::Abstract" => "0";
requires "MIME::Base64" => "0";
requires "PerlX::Maybe" => "0";
requires "Session::Storage::Secure" => "0.010";
requires "Storable" => "0";
requires "String::CRC32" => "0";
lib/Dancer/Session/Cookie.pm view on Meta::CPAN
our $AUTHORITY = 'cpan:YANICK';
# ABSTRACT: Encrypted cookie-based session backend for Dancer
$Dancer::Session::Cookie::VERSION = '0.30';
use strict;
use warnings;
use 5.10.0;
use parent 'Dancer::Session::Abstract';
use Session::Storage::Secure 0.010;
use Crypt::CBC;
use String::CRC32;
use Crypt::Rijndael;
use Time::Duration::Parse;
use Dancer 1.3113 ':syntax'; # 1.3113 for on_reset_state and fixed after hook
use Dancer::Cookie ();
use Dancer::Cookies ();
use Storable ();
use MIME::Base64 ();
use PerlX::Maybe;
lib/Dancer/Session/Cookie.pm view on Meta::CPAN
sub init {
my ($self) = @_;
$self->SUPER::init();
my $key = setting("session_cookie_key") # XXX default to smth with warning
or die "The setting session_cookie_key must be defined";
my $duration = $self->_session_expires_as_duration;
$CIPHER = Crypt::CBC->new(
-key => $key,
-cipher => 'Rijndael',
);
$STORE = Session::Storage::Secure->new(
secret_key => $key,
sereal_encoder_options => { snappy => 1, stringify_unknown => 1 },
sereal_decoder_options => { validate_utf8 => 1 },
maybe default_duration => $duration,
);
lib/Dancer/Session/Cookie.pm view on Meta::CPAN
limit the size of a cookie to 4KB, but that includes the space taken to store
the cookie's name, expiration and other attributes as well as its content.
=head1 CONFIGURATION
The setting B<session> should be set to C<cookie> in order to use this session
engine in a Dancer application. See L<Dancer::Config>.
Another setting is also required: B<session_cookie_key>, which should
contain a random string of at least 16 characters (shorter keys are
not cryptographically strong using AES in CBC mode).
The optional B<session_expires> setting can also be passed,
which will provide the duration time of the cookie. If it's not present, the
cookie won't have an expiration value.
Here is an example configuration to use in your F<config.yml>:
session: "cookie"
session_cookie_key: "kjsdf07234hjf0sdkflj12*&(@*jk"
session_expires: 1 hour
lib/Dancer/Session/Cookie.pm view on Meta::CPAN
B<session_cookie_path> can be used to control the path of the session
cookie. The default is C</>.
The global B<session_secure> setting is honored and a secure (https
only) cookie will be used if set.
=head1 DEPENDENCY
This module depends on L<Session::Storage::Secure>. Legacy support is provided
using L<Crypt::CBC>, L<Crypt::Rijndael>, L<String::CRC32>, L<Storable> and
L<MIME::Base64>.
=head1 SEE ALSO
See L<Dancer::Session> for details about session usage in route handlers.
See L<Plack::Middleware::Session::Cookie>,
L<Catalyst::Plugin::CookiedSession>, L<Mojolicious::Controller/session> for alternative implementation of this mechanism.
=head1 AUTHORS
t/00-report-prereqs.dd view on Meta::CPAN
}
},
'develop' => {
'requires' => {
'Test::More' => '0.96',
'Test::Vars' => '0'
}
},
'runtime' => {
'requires' => {
'Crypt::CBC' => '0',
'Crypt::Rijndael' => '0',
'Dancer' => '1.3113',
'Dancer::Cookie' => '0',
'Dancer::Cookies' => '0',
'Dancer::Session::Abstract' => '0',
'MIME::Base64' => '0',
'PerlX::Maybe' => '0',
'Session::Storage::Secure' => '0.010',
'Storable' => '0',
'String::CRC32' => '0',
( run in 1.424 second using v1.01-cache-2.11-cpan-e1769b4cff6 )