#!/usr/bin/env perl
# PODNAME: plugauthclient
# ABSTRACT: Plug auth command line client
our $VERSION = '0.33'; # VERSION
use strict;
use warnings;
use File::Spec;
use File::Basename 'dirname';
use lib join '/', File::Spec->splitdir(dirname(__FILE__)), 'lib';
use lib join '/', File::Spec->splitdir(dirname(__FILE__)), '..', 'lib';
use PlugAuth::Client;
use Clustericious::Client::Command;
use Log::Log4perl::CommandLine (':all', ':loginit' => <<"EOT");
log4perl.rootLogger = INFO, Screen
log4perl.appender.Screen = Log::Log4perl::Appender::ScreenColoredLevels
log4perl.appender.Screen.layout = Log::Log4perl::Layout::PatternLayout
log4perl.appender.Screen.layout.ConversionPattern = [%-5p] %d %F{1} (%L) %m %n
EOT
Clustericious::Client::Command->run(PlugAuth::Client->new, @ARGV);
__END__
=pod
=encoding UTF-8
=head1 NAME
plugauthclient - Plug auth command line client
=head1 VERSION
version 0.33
=head1 SYNOPSIS
The PlugAuth API can also be interfaced on the command line
using the plugauthclient command:
# Find all URLs containing /xyz, alice has permission to GET
plugauthclient resources alice GET /xyz
# Check which resources containing the word "ball" are available
# for charliebrown to perform the "kick" action :
plugauthclient resources charliebrown kick ball
# Check if a given host has the tag "trusted"
plugauthclient host_tag 127.0.0.1 trusted
# List of users
plugauthclient user
# List of groups
plugauthclient group
# List of users belonging to peanuts group
plugauthclient users peanuts
=head1 SEE ALSO
L<PlugAuth>, L<PlugAuth::Client>
=head1 AUTHOR
Graham Ollis <gollis@sesda3.com>
=head1 COPYRIGHT AND LICENSE
This software is copyright (c) 2012 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.
=cut