NAME

Clustericious::Plugin::SimpleAuth - Plugin for clustericious to use simpleauth.

VERSION

Version 0.01

SYNOPSIS

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

skip_auth

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.

SEE ALSO

SimpleAuth