Доброго всем
¡ ¡ ¡ ALL GLORY TO GLORIA ! ! !
Mojolicious::Plugin::RoutesAuthDBI::Guest - session for guests. Store guests in separate DBI table.
$app->plugin('RoutesAuthDBI', ... guest => {< hashref options list below >}, ... );
String, default to 'Mojolicious::Plugin::RoutesAuthDBI'.
String, default to 'Guest' (this module).
String, session storage of guest data. Default to 'guest_data'.
Hashref, any DB tables names. See Mojolicious::Plugin::RoutesAuthDBI::Schema#Default-variables-for-SQL-templates.
String, DB table guests name. See Mojolicious::Plugin::RoutesAuthDBI::Schema#Default-variables-for-SQL-templates.
Get current guest hashref by session and undef overwise.
my $guest = $c->access->plugin->guest->current($c);
Store guest data in DB table and set session_key. Headers of request save in "data" column.
$c->access->plugin->guest->store($c, {"Glory"=>"is ♥ for me"});
True if current session of guest.
if( $c->access->plugin->guest->is_guest($c) ) {...}
Loads guest data from DB table by its ID row. JSON column "data" will expand.
my $data = $c->access->plugin->guest->load($id);
Cleanup stash and reload guest data.
my $guest = $c->access->plugin->guest->reload($c);
Mojolicious::Plugin::Authentication
Михаил Че (Mikhail Che), <mche [on] cpan.org>
<mche [on] cpan.org>
Please report any bugs or feature requests at https://github.com/mche/Mojolicious-Plugin-RoutesAuthDBI/issues. Pull requests welcome also.
Copyright 2016+ Mikhail Che.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Mojolicious::Plugin::RoutesAuthDBI, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mojolicious::Plugin::RoutesAuthDBI
CPAN shell
perl -MCPAN -e shell install Mojolicious::Plugin::RoutesAuthDBI
For more information on module installation, please visit the detailed CPAN module installation guide.