https://github.com/perldancer/dancer-plugin-auth-rbac
Dancer Authentication and Role-Based Access Control Framework
https://github.com/perldancer/dancer-plugin-auth-rbac
Last synced: about 1 year ago
JSON representation
Dancer Authentication and Role-Based Access Control Framework
- Host: GitHub
- URL: https://github.com/perldancer/dancer-plugin-auth-rbac
- Owner: PerlDancer
- Created: 2010-12-08T15:45:22.000Z (over 15 years ago)
- Default Branch: master
- Last Pushed: 2011-06-20T22:11:22.000Z (about 15 years ago)
- Last Synced: 2024-05-09T11:35:47.972Z (about 2 years ago)
- Language: Perl
- Homepage:
- Size: 313 KB
- Stars: 6
- Watchers: 11
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README
Awesome Lists containing this project
README
Dancer-Plugin-Authorize - Dancer Authentication and Role-Based Access Control Framework!
use Dancer;
use Dancer::Plugin::Authorize;
post '/login' => sub {
my $auth = auth(params->{user}, params->{pass});
if ($auth) {
if ($auth->asa('guest')) {
...
}
if ($auth->can('manage_accounts')) {
if ($auth->can('manage_accounts', 'create')) {
...
}
else {
...
}
}
}
};
To install this module using code from CPAN,
run the following commands
perl Makefile.PL
make
make test
make install
To install this module using code from the git repository,
run the following commands (Dist::Zilla required):
dzil build
cd Dancer-Plugin-Authorize-#.##
cpan .
REPOSITORY
http://github.com/alnewkirk/Dancer-Plugin-Authorize/
COPYRIGHT AND LICENCE
Copyright (C) 2010 Al Newkirk
This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.