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

get rid of Data:: part in namespace

parent 0ecbf926
No related branches found
No related tags found
No related merge requests found
......@@ -13,12 +13,12 @@ use Getopt::Long qw(:config auto_help);
use Log::Any::Adapter;
use Pod::Usage;
use IdPAccountManager::Data::AuthenticationToken;
use IdPAccountManager::Data::AuthenticationToken::Manager;
use IdPAccountManager::Data::ServiceProvider;
use IdPAccountManager::Data::ServiceProvider::Manager;
use IdPAccountManager::Data::TestAccount;
use IdPAccountManager::Data::TestAccount::Manager;
use IdPAccountManager::AuthenticationToken;
use IdPAccountManager::AuthenticationToken::Manager;
use IdPAccountManager::ServiceProvider;
use IdPAccountManager::ServiceProvider::Manager;
use IdPAccountManager::TestAccount;
use IdPAccountManager::TestAccount::Manager;
use IdPAccountManager::Configuration;
use IdPAccountManager::SAMLMetadata;
use IdPAccountManager::Tools;
......@@ -88,7 +88,7 @@ sub add_account {
-verbose => 0
) unless $options{sp_entityid};
my $test_account = IdPAccountManager::Data::TestAccount->new(
my $test_account = IdPAccountManager::TestAccount->new(
db => $db,
account_profile => $options{account_profile},
sp_entityid => $options{sp_entityid}
......@@ -122,7 +122,7 @@ sub list_accounts {
}
my $accounts =
IdPAccountManager::Data::TestAccount::Manager->get_testaccounts(db => $db, %args);
IdPAccountManager::TestAccount::Manager->get_testaccounts(db => $db, %args);
if (! @$accounts) {
printf "No matching test account in DB\n";
......@@ -139,7 +139,7 @@ sub list_accounts {
printf "%d accounts removed\n", scalar @$accounts;
$accounts =
IdPAccountManager::Data::TestAccount::Manager->get_testaccounts(
IdPAccountManager::TestAccount::Manager->get_testaccounts(
db => $db
);
......@@ -176,7 +176,7 @@ sub parse_metadata {
## List SAML entities
printf "Hashref representing the metadata:\n";
print Data::Dumper->Dump($data);
print Dumper->Dump($data);
}
sub add_provider {
......@@ -192,7 +192,7 @@ sub add_provider {
) unless $options{contacts};
## Check if entry already exists in DB first
my $provider = IdPAccountManager::Data::ServiceProvider->new(
my $provider = IdPAccountManager::ServiceProvider->new(
db => $db,
entityid => $options{sp_entityid}
);
......@@ -203,7 +203,7 @@ sub add_provider {
$provider->contacts($options{contacts});
$provider->displayname($options{displayname}) if $options{displayname};
} else {
$provider = IdPAccountManager::Data::ServiceProvider->new(
$provider = IdPAccountManager::ServiceProvider->new(
db => $db,
entityid => $options{sp_entityid},
contacts => $options{contacts},
......@@ -222,7 +222,7 @@ sub add_provider {
sub list_providers {
my %args;
my $providers = IdPAccountManager::Data::ServiceProvider::Manager->get_serviceproviders(db => $db, %args);
my $providers = IdPAccountManager::ServiceProvider::Manager->get_serviceproviders(db => $db, %args);
if (! @$providers) {
printf "No service provider in DB\n";
......@@ -255,7 +255,7 @@ sub list_tokens {
}
my $tokens =
IdPAccountManager::Data::AuthenticationToken::Manager->get_authenticationtokens(db => $db, %args);
IdPAccountManager::AuthenticationToken::Manager->get_authenticationtokens(db => $db, %args);
if (!@$tokens) {
printf "No corresponding token found in DB\n";
......@@ -309,7 +309,7 @@ sub add_token {
-verbose => 0
) unless $options{sp_entityid};
my $token = IdPAccountManager::Data::AuthenticationToken->new(
my $token = IdPAccountManager::AuthenticationToken->new(
db => $db,
email_address => $options{email_address},
sp_entityid => $options{sp_entityid}
......@@ -322,7 +322,7 @@ sub add_token {
if ($token->load(speculative => 1)) {
$token->delete() or die "failed to delete authentication token\n";
$token = IdPAccountManager::Data::AuthenticationToken->new(
$token = IdPAccountManager::AuthenticationToken->new(
db => $db,
email_address => $options{email_address},
sp_entityid => $options{sp_entityid}
......
package IdPAccountManager::Data::AuthenticationToken;
package IdPAccountManager::AuthenticationToken;
use strict;
use warnings;
......
package IdPAccountManager::AuthenticationToken::Manager;
use strict;
use warnings;
use base qw(Rose::DB::Object::Manager);
use IdPAccountManager::AuthenticationToken;
sub object_class { 'IdPAccountManager::AuthenticationToken' }
__PACKAGE__->make_manager_methods('authenticationtokens');
1;
package IdPAccountManager::Data::ServiceProvider;
package IdPAccountManager::ServiceProvider;
use strict;
use warnings;
......
package IdPAccountManager::ServiceProvider::Manager;
use strict;
use warnings;
use base qw(Rose::DB::Object::Manager);
use IdPAccountManager::ServiceProvider;
sub object_class { 'IdPAccountManager::ServiceProvider' }
__PACKAGE__->make_manager_methods('serviceproviders');
1;
package IdPAccountManager::Data::TestAccount;
package IdPAccountManager::TestAccount;
use strict;
use warnings;
......
package IdPAccountManager::Data::TestAccount::Manager;
package IdPAccountManager::TestAccount::Manager;
use strict;
use warnings;
use base qw(Rose::DB::Object::Manager);
use IdPAccountManager::Data::TestAccount;
use IdPAccountManager::TestAccount;
sub object_class { 'IdPAccountManager::Data::TestAccount' }
sub object_class { 'IdPAccountManager::TestAccount' }
__PACKAGE__->make_manager_methods('testaccounts');
......
......@@ -9,9 +9,9 @@ use Template;
use Log::Any::Adapter;
use List::MoreUtils qw(uniq);
use IdPAccountManager::Data::TestAccount;
use IdPAccountManager::Data::AuthenticationToken;
use IdPAccountManager::Data::ServiceProvider;
use IdPAccountManager::TestAccount;
use IdPAccountManager::AuthenticationToken;
use IdPAccountManager::ServiceProvider;
use IdPAccountManager::SAMLMetadata;
use IdPAccountManager::Tools;
......@@ -213,7 +213,7 @@ sub req_select_sp {
}
# Create a persistent service provider object
my $provider = IdPAccountManager::Data::ServiceProvider->new(
my $provider = IdPAccountManager::ServiceProvider->new(
db => $self->{db},
entityid => $self->{in}->{sp_entityid}
);
......@@ -288,7 +288,7 @@ sub req_generate_token {
return undef;
}
my $provider = IdPAccountManager::Data::ServiceProvider->new(
my $provider = IdPAccountManager::ServiceProvider->new(
db => $self->{db},
entityid => $self->{in}->{sp_entityid},
);
......@@ -318,7 +318,7 @@ sub req_generate_token {
return undef;
}
my $token = IdPAccountManager::Data::AuthenticationToken->new(
my $token = IdPAccountManager::AuthenticationToken->new(
db => $self->{db},
email_address => $self->{in}->{email_address},
sp_entityid => $self->{in}->{sp_entityid}
......@@ -340,7 +340,7 @@ sub req_generate_token {
return undef;
}
$token = IdPAccountManager::Data::AuthenticationToken->new(
$token = IdPAccountManager::AuthenticationToken->new(
db => $self->{db},
email_address => $self->{in}->{email_address},
sp_entityid => $self->{in}->{sp_entityid}
......@@ -428,7 +428,7 @@ sub req_validate_token {
return undef;
}
my $token = IdPAccountManager::Data::AuthenticationToken->new(
my $token = IdPAccountManager::AuthenticationToken->new(
db => $self->{db},
token => $self->{in}->{authentication_token}
);
......@@ -465,7 +465,7 @@ sub req_validate_token {
my @accounts;
foreach my $profile (split(/, */, $self->{configuration}->{account_profiles})) {
my $account = IdPAccountManager::Data::TestAccount->new(
my $account = IdPAccountManager::TestAccount->new(
db => $self->{db},
account_profile => $profile,
sp_entityid => $self->{in}->{sp_entityid},
......
modulesdir = $(pkgdatadir)/lib
nobase_modules_DATA = \
IdPAccountManager/AuthenticationToken.pm \
IdPAccountManager/AuthenticationToken/Manager.pm \
IdPAccountManager/Configuration.pm \
IdPAccountManager/Data/AuthenticationToken.pm \
IdPAccountManager/Data/AuthenticationToken/Manager.pm \
IdPAccountManager/Data/ServiceProvider.pm \
IdPAccountManager/Data/ServiceProvider/Manager.pm \
IdPAccountManager/Data/TestAccount.pm \
IdPAccountManager/Data/TestAccount/Manager.pm \
IdPAccountManager/DB.pm \
IdPAccountManager/DB/Object.pm \
IdPAccountManager/SAMLMetadata.pm \
IdPAccountManager/ServiceProvider.pm \
IdPAccountManager/ServiceProvider/Manager.pm \
IdPAccountManager/TestAccount.pm \
IdPAccountManager/TestAccount/Manager.pm \
IdPAccountManager/Tools.pm \
IdPAccountManager/WebRequest.pm
......
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