Skip to content
Snippets Groups Projects
Commit 38fcf630 authored by Guillaume ROUSSE's avatar Guillaume ROUSSE
Browse files

use shorter names for actions

parent e97f5d08
No related branches found
No related tags found
No related merge requests found
......@@ -60,14 +60,14 @@ IdPAccountManager::DB->register_db(
my $db = IdPAccountManager::DB->new();
for ($action) {
when ('add_test_account') { add_test_account() }
when ('list_test_accounts') { list_test_accounts() }
when ('add_service_provider') { add_service_provider() }
when ('list_service_providers') { list_service_providers() }
when ('add_authentication_token') { add_authentication_token() }
when ('get_authentication_token') { get_authentication_token() }
when ('list_authentication_tokens') { list_authentication_tokens() }
when ('parse_federation_metadata') { parse_federation_metadata() }
when ('add_account') { add_account() }
when ('list_accounts') { list_accounts() }
when ('add_provider') { add_provider() }
when ('list_providers') { list_providers() }
when ('add_token') { add_token() }
when ('get_token') { get_token() }
when ('list_tokens') { list_tokens() }
when ('parse_metadata') { parse_metadata() }
default {
pod2usage(
-message => "invalid action '$action', aborting\n",
......@@ -76,7 +76,7 @@ for ($action) {
}
}
sub add_test_account {
sub add_account {
pod2usage(
-message => "missing account_profile option, aborting\n",
-verbose => 0
......@@ -106,7 +106,7 @@ sub add_test_account {
}
sub list_test_accounts {
sub list_accounts {
my %args;
if ($options{sp_entityid}) {
push @{ $args{query} }, sp_entityid => $options{sp_entityid};
......@@ -148,7 +148,7 @@ sub list_test_accounts {
}
sub parse_federation_metadata {
sub parse_metadata {
my $federation_metadata;
eval {
......@@ -168,7 +168,7 @@ sub parse_federation_metadata {
print Data::Dumper->Dump($data);
}
sub add_service_provider {
sub add_provider {
pod2usage(
-message => "missing sp_entityid option, aborting\n",
......@@ -212,7 +212,7 @@ sub add_service_provider {
}
sub list_service_providers {
sub list_providers {
my %args;
my $providers = IdPAccountManager::Data::ServiceProvider::Manager->get_serviceproviders(db => $db, %args);
......@@ -227,7 +227,7 @@ sub list_service_providers {
}
sub list_authentication_tokens {
sub list_tokens {
my %args;
if ($options{sp_entityid}) {
......@@ -262,7 +262,7 @@ sub list_authentication_tokens {
}
sub get_authentication_token {
sub get_token {
my %args;
if ($options{token}) {
......@@ -285,7 +285,7 @@ sub get_authentication_token {
}
sub add_authentication_token {
sub add_token {
pod2usage(
-message => "missing email_address option, aborting\n",
......@@ -335,102 +335,102 @@ account-manager-client.pl - Command line client to the Test IdP Account manager
=head1 SYNOPSIS
B<account-manager-client.pl> B<add_test_account>
B<account-manager-client.pl> B<add_account>
S<B<--account_profile> I<string>>
S<B<--sp_entityid> I<string>>
B<account-manager-client.pl> B<list_test_accounts>
B<account-manager-client.pl> B<list_accounts>
S<[B<--account_profile> I<string>]>
S<[B<--sp_entityid> I<string>]>
[B<--filter_expired>]
[B<--delete>]
B<account-manager-client.pl> B<parse_federation_metadata>
B<account-manager-client.pl> B<parse_metadata>
S<[B<--sp_entityid> I<string>]>
B<account-manager-client.pl> B<add_service_provider>
B<account-manager-client.pl> B<add_provider>
S<B<--sp_entityid> I<string>>
S<B<--contact> I<string>>
S<[B<--displayname> I<string>]>
B<account-manager-client.pl> B<list_service_providers>
B<account-manager-client.pl> B<list_providers>
B<account-manager-client.pl> B<list_authentication_tokens>
B<account-manager-client.pl> B<list_tokens>
S<B<--sp_entityid> I<string>>
S<[B<--token> I<string>]>
[B<--filter_expired>]
[B<--delete>]
B<account-manager-client.pl> B<get_authentication_token>
B<account-manager-client.pl> B<get_token>
S<B<--sp_entityid> I<string>>
S<[B<--token> I<string>]>
B<account-manager-client.pl> B<add_authentication_token>
B<account-manager-client.pl> B<add_token>
S<B<--sp_entityid> I<string>>
S<B<--email_address> I<string>>
=head1 DESCRIPTION
The Test Account manager instanciates test accounts associated to a SAML
Identity Provider. This script provides a command-line interface for most
Identity Provider. This script provides a command-line interface for most
functions.
=head1 EXAMPLES
$> account-manager-client.pl add_test_account \
$> account-manager-client.pl add_account \
--sp_entityid https://test.federation.renater.fr/test/ressource \
--account_profile student1
Adds a new test account.
$> account-manager-client.pl list_test_accounts \
$> account-manager-client.pl list_accounts \
--sp_entityid https://test.federation.renater.fr/test/ressource \
--account_profile student1
List all test accounts. Criterias can be added to filter test accounts.
$> account-manager-client.pl list_test_accounts --filter_expired
$> account-manager-client.pl list_accounts --filter_expired
List all expired test accounts.
$> account-manager-client.pl list_test_accounts --filter_expired \
$> account-manager-client.pl list_accounts --filter_expired \
--delete
Remove all expired test accounts from DB.
$> account-manager-client.pl parse_federation_metadata
$> account-manager-client.pl parse_metadata
Parses the SAML metadata file, as defined by the
C<federation_metadata_file_path> configuration parameter.
$> account-manager-client.pl list_authentication_tokens \
$> account-manager-client.pl list_tokens \
--sp_entityid https://test.federation.renater.fr/test/ressource \
--token dhj67sjJ
List all authentication tokens. Criterias can be added to filter tokens.
$> account-manager-client.pl list_authentication_tokens \
$> account-manager-client.pl list_tokens \
--filter_expired
List all expired authentication tokens.
$> account-manager-client.pl list_authentication_tokens \
$> account-manager-client.pl list_tokens \
--filter_expired --delete
Remove all expired authentication tokens from DB.
$> account-manager-client.pl get_authentication_token \
$> account-manager-client.pl get_token \
--token dhj67sjJ
Get informations on a token.
$> account-manager-client.pl add_authentication_token \
$> account-manager-client.pl add_token \
--email_address john@my.fqdn \
--sp_entityid https://test.federation.renater.fr/test/ressource
Adds a new test account.
$> account-manager-client.pl add_service_provider \
$> account-manager-client.pl add_provider \
--sp_entityid https://test.federation.renater.fr/test/ressource \
--displayname 'Test SP' --contacts email1@dom,email2@dom
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment