Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Dancer Authentication and Role-Based Access Control Framework

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 t
Octocat-spinner-32 .gitignore
Octocat-spinner-32 README
Octocat-spinner-32 dist.ini
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.
Something went wrong with that request. Please try again.