The Perl Toolchain Summit 2025 Needs You: You can help 🙏 Learn more

NAME

Clustericious::Plugin::PlugAuth - Plugin for clustericious to use PlugAuth.

VERSION

version 1.29

SYNOPSIS

MyApp.conf:

---
plug_auth:

Application:

package MyApp;
# 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';

DESCRIPTION

This provides authenticate and authorize methods which can be called from your applications Route class.

ATTRIBUTES

config_url

The URL of the PlugAuth server to authenticate against.

METHODS

authenticate [ $realm ]

Require username and password authentication, optionally with a realm. If a realm is not provided, '' is used.

authorize [$action, [$resource]]

Require the authenticated user have the authorization to perform the given action on the given resource.

SEE ALSO

PlugAuth, Clustericious

AUTHOR

Original author: Brian Duggan

Current maintainer: Graham Ollis <plicease@cpan.org>

Contributors:

Curt Tilmes

Yanick Champoux

COPYRIGHT AND LICENSE

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.