From 87f63b3dde886f3e399d695addf436135168bcd1 Mon Sep 17 00:00:00 2001 From: "renater.salaun" <renater.salaun@047e039d-479c-447e-8a29-aa6bf4a09bab> Date: Wed, 10 Sep 2014 06:35:18 +0000 Subject: [PATCH] Fix account creation process git-svn-id: https://svn.geant.net/GEANT/edugain_testidp_account_manager/trunk@5 047e039d-479c-447e-8a29-aa6bf4a09bab --- bin/account-manager-client.pl | 3 +++ lib/IdPAccountManager/TestAccount.pm | 8 ++++++++ templates/accountProfiles/valid-accounts.php.tt2 | 1 + 3 files changed, 12 insertions(+) diff --git a/bin/account-manager-client.pl b/bin/account-manager-client.pl index ae6ad37..eee0ffc 100755 --- a/bin/account-manager-client.pl +++ b/bin/account-manager-client.pl @@ -36,6 +36,9 @@ if ($options{'create_test_account'}) { unless (defined $test_account) { die "Failed to create test account"; } + + printf "Account created:\n\tuserid: user%d\n\tpassword: %s\n", $test_account->id, $test_account->user_password; + }elsif ($options{'list_test_accounts'}) { my %args; diff --git a/lib/IdPAccountManager/TestAccount.pm b/lib/IdPAccountManager/TestAccount.pm index aee85a9..b55321b 100644 --- a/lib/IdPAccountManager/TestAccount.pm +++ b/lib/IdPAccountManager/TestAccount.pm @@ -21,6 +21,14 @@ has 'sp_entityid' => (is => 'rw', isa => 'entityid', required => 1, ); +has 'id' => (is => 'ro', + isa => 'Int', + required => 0, + ); +has 'user_password' => (is => 'ro', + isa => 'Str', + required => 0, + ); sub BUILD { diff --git a/templates/accountProfiles/valid-accounts.php.tt2 b/templates/accountProfiles/valid-accounts.php.tt2 index 7195810..2f6a363 100644 --- a/templates/accountProfiles/valid-accounts.php.tt2 +++ b/templates/accountProfiles/valid-accounts.php.tt2 @@ -1,3 +1,4 @@ +<?php // template for a PhP configuration file loaded in simpleSamlPhp authsources.php file $validTestAccounts = array ( 'exampleauth:UserPass', -- GitLab