Clustericious::Plugin::SimpleAuth - Plugin for clustericious to use simpleauth.
Version 0.01
In the config file :
"simple_auth" : { "url : "http://simpleauthserver.com:9999" }
In startup() (done by default for all clustericious apps) :
$app->plugin('simple_auth');
In routes :
get '/one' => "unprotected"; authenticate; get '/two' => "protected by simpleauth"; authenticate "Realm"; get '/three' => "protected by simpleauth, different realm"; authorize "action", "resource"; get "/five"; # check for permission to do $action on $resource authorize "action"; get '/four'; # use the url path as the name of the resource authorize "<method>"; get '/six'; # use the request method as the $action, and the url as the path authorize "<method>", "/myprefix/<path>"; get 'seven'; # fill in <path> with request path to compute the resource
Clustericious::Plugin::SimpleAuth->skip_auth(1); Set this global flag to bypass authentication and authorization, e.g. during a subequest. This flag is reset at the end of the dispatch cycle.
SimpleAuth
To install Clustericious, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Clustericious
CPAN shell
perl -MCPAN -e shell install Clustericious
For more information on module installation, please visit the detailed CPAN module installation guide.