Clustericious::Plugin::PlugAuth - Plugin for clustericious to use PlugAuth.
version 1.22
MyApp.conf:
--- plug_auth: url: http://plugauthserver:3000
Application:
package MyApp; use base qw( Clustericious::App ); use Clustericious::RouteBuilder; # unprotected get '/public' => 'unprotected'; # require PlugAuth username/password authenticate; get '/private1' => 'protected'; # protected by PlugAuth an explicit realm autheticate 'realm'; get '/private2' => 'realm protected'; # check for permissions to do $action on $resource authorize 'action', 'resource'; get '/restricted1' => 'authz_restricted'; # check for premissions to do $action on the resource /restricted2 authorize 'action'; get '/restricted2'; # HTTP method as the $action and /http_method_get as the resource authorize '<method>'; get '/http_method_get'; # HTTP method as the $action and "/prefix/http_method_with_prefix" # as the resource. authorize '<method>', '/myprefix/<path>'; get '/http_method_with_prefix';
This provides authenticate and authorize methods which can be called from your applications Route class.
The URL of the PlugAuth server to authenticate against.
Require username and password authentication, optionally with a realm. If a realm is not provided, '' is used.
Require the authenticated user have the authorization to perform the given action on the given resource.
PlugAuth, Clustericious
Original author: Brian Duggan
Current maintainer: Graham Ollis <plicease@cpan.org>
Contributors:
Curt Tilmes
This software is copyright (c) 2013 by NASA GSFC.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
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.