diff --git a/lib/IdPAccountManager/AuthenticationToken.pm b/lib/IdPAccountManager/AuthenticationToken.pm index 31b6e00a68f2c526ed5331c307ac907d41d4e0ca..2262d7d55c489a50258c61848814df2143bbab3f 100644 --- a/lib/IdPAccountManager/AuthenticationToken.pm +++ b/lib/IdPAccountManager/AuthenticationToken.pm @@ -28,7 +28,6 @@ sub new { my $self = {}; - ## Bless AuthenticationToken object bless $self, $pkg; ## Object may be created either with a hashref as argument or an IdPAccountManager::Data::Authenticationtoken object @@ -136,7 +135,7 @@ sub _generate_token { return substr(Digest::MD5::md5_hex(time . $$ . $salt), -1 * $size); } -1; # Magic true value required at end of module +1; __END__ =head1 NAME diff --git a/lib/IdPAccountManager/SAMLMetadata.pm b/lib/IdPAccountManager/SAMLMetadata.pm index 2ae3782426b937e8b91e2b77cb99d44aec5776a0..1cbfdad7d6403a4ff9411a8710a059ac37a1e880 100644 --- a/lib/IdPAccountManager/SAMLMetadata.pm +++ b/lib/IdPAccountManager/SAMLMetadata.pm @@ -21,7 +21,6 @@ sub new { my $self = { logger => $args{logger} }; - ## Bless SAMLMetadata object bless $self, $pkg; return $self; @@ -115,7 +114,6 @@ sub print { return 1.; } -## Internal function ## returns a Lib::XML représenting an XML file sub _get_xml_object { my $self = shift; @@ -176,13 +174,6 @@ sub _parse_saml_metadata { my $self = shift; my %options = @_; - #$self->{logger}->log(level => LOG_TRACE, message => join(',',%options)); - -#unless ($options{'filter_entity_type'}) { -#$self->{logger}->log(level => LOG_ERROR, message => "paramètre entity_type manquant"); -#return undef; -#} - my $root = $options{'metadata_as_xml'}; my @extracted_array; @@ -202,14 +193,9 @@ sub _parse_saml_metadata { if ($options{'filter_entity_id'} && ($options{'filter_entity_id'} ne $extracted_data->{'entityid'})); -#$self->{logger}->log(level => LOG_TRACE, message => "EntityId: %s - Cherche %s", $extracted_data->{'entityid'}, $options{'filter_entity_id'}); - $extracted_data->{'xml_md'} = IdPAccountManager::Tools::escape_xml($EntityDescriptor->toString()); -#$self->{logger}->log(level => LOG_TRACE, message => "EntityId: %s", $extracted_data->{'entityid'}); -#$self->{logger}->log(level => LOG_TRACE, message => "Entity dump: %s", $EntityDescriptor->toString()); - foreach my $child ($EntityDescriptor->childNodes()) { ## Ignoringnodes of type XML::LibXML::Text or XML::LibXML::Comment @@ -224,7 +210,7 @@ sub _parse_saml_metadata { { ## On ne prend en compte que les endpoints prévus -#next unless ($sso->getAttribute('Binding') && defined $supported_saml_bindings{$sso->getAttribute('Binding')}); + #next unless ($sso->getAttribute('Binding') && defined $supported_saml_bindings{$sso->getAttribute('Binding')}); ## On extrait les infos sur les endpoints push @{ $extracted_data->{'idp_endpoints'} }, @@ -301,7 +287,6 @@ sub _parse_saml_metadata { } elsif ($child->nodeName =~ /Extensions$/) { -#$self->{logger}->log(level => LOG_TRACE, message => "Extensions for %s", $extracted_data->{'entityid'}); foreach my $registrationinfo ( $child->getElementsByLocalName('RegistrationInfo')) { @@ -408,7 +393,6 @@ sub _parse_saml_metadata { } ## Filter entities based on type -#$self->{logger}->log(level => LOG_TRACE, message => "Entity type : %s", $extracted_data->{'type'}); next if (defined $options{'filter_entity_type'} && ($options{'filter_entity_type'} ne $extracted_data->{'type'})); @@ -426,7 +410,7 @@ sub _parse_saml_metadata { return \@extracted_array; } -1; # Magic true value required at end of module +1; __END__ =head1 NAME diff --git a/lib/IdPAccountManager/ServiceProvider.pm b/lib/IdPAccountManager/ServiceProvider.pm index 41eb2ed32d852420b3805b6c8214f3b177bba438..37cf7673d34aefd2c0cc229ee2933ed28ac9641d 100644 --- a/lib/IdPAccountManager/ServiceProvider.pm +++ b/lib/IdPAccountManager/ServiceProvider.pm @@ -83,7 +83,7 @@ sub list_service_providers { return $service_providers; } -1; # Magic true value required at end of module +1; __END__ =head1 NAME diff --git a/lib/IdPAccountManager/TestAccount.pm b/lib/IdPAccountManager/TestAccount.pm index 50a1b8a96510af62f5b89a88c9715a2ec126017f..60f685038bd4d7ca776b1df287fee354237d99c1 100644 --- a/lib/IdPAccountManager/TestAccount.pm +++ b/lib/IdPAccountManager/TestAccount.pm @@ -27,7 +27,6 @@ sub new { my $self = {}; - ## Bless Provider object bless $self, $pkg; ## Object may be created either with a hashref as argument or an IdPAccountManager::Data::Testaccount object @@ -142,9 +141,7 @@ sub create_test_accounts_for_sp { return @test_accounts; } -#before 'new' => sub { print "about to call new\n"; }; - -1; # Magic true value required at end of module +1; __END__ =head1 NAME diff --git a/lib/IdPAccountManager/Tools.pm b/lib/IdPAccountManager/Tools.pm index e911d46eadd12d2e5e4b5aca1821c8166ff27f69..c5c20b706bbe1dfccd56d1532370c0f1c0e663dc 100644 --- a/lib/IdPAccountManager/Tools.pm +++ b/lib/IdPAccountManager/Tools.pm @@ -265,7 +265,7 @@ sub boolean2integer { return undef; } -1; # Magic true value required at end of module +1; __END__ =head1 NAME diff --git a/lib/IdPAccountManager/WebRequest.pm b/lib/IdPAccountManager/WebRequest.pm index 894ab560078807039ad2b467354a2ed8cb02ba08..21a83963dc142f5825ff744ab29da3e0be1810c0 100755 --- a/lib/IdPAccountManager/WebRequest.pm +++ b/lib/IdPAccountManager/WebRequest.pm @@ -43,23 +43,14 @@ sub new { $self->{'param_out'}{'actions'} = $args{actions}; $self->{'param_out'}{'conf'} = \%Conf::global; - ## Dumping input data -#open TMP, ">/tmp/account_manager.in"; IdPAccountManager::Tools::dump_var($self->{'param_in'}, 0, \*TMP); close TMP; - ## Clean input vars foreach my $key (keys %{ $self->{'param_in'} }) { -#$self->{logger}->log(level => LOG_TRACE, message => "PARAM_ENTREE: %s=%s", $key, $self->{'param_in'}{$key}); - ## Removing all ^M (0D) $self->{'param_in'}{$key} =~ s/\r//g; $self->{'param_in'}{$key} =~ s/\s+$//; ## Remove trailing spaces $self->{'param_in'}{$key} =~ s/^\s+//; ## Remove leading spaces - #if ($self->{'param_in'}{$key} =~ /\0/) { - # my @valeurs = split /\0/, $self->{'param_in'}{$key}; - # $self->{'param_in'}{$key} = $valeurs[0]; ## Only keep first value of multi-valued parameters - #} ## If action_xx param is set, then action=xx ## Usefull to have sementicless values in submit forms @@ -131,8 +122,6 @@ sub execute { } while ($self->{'next_action'}); - #return undef if (!defined $status); - return 1; } @@ -141,16 +130,9 @@ sub respond { my $self = shift; $self->{logger}->log(level => LOG_DEBUG, message => ""); - ## Dump output data -#open TMP, ">/tmp/account_registry.out"; IdPAccountManager::Tools::dump_var($self->{'param_out'}, 0, \*TMP); close TMP; - - ## Enable dumping off all variables in web pages - #$self->{'param_out'}{'dump'} = $self->{'param_out'}; - ## Automatic pass object entries to the output hash foreach my $key (keys %{$self}) { - #$self->{logger}->log(level => LOG_TRACE, message => "Passing $key"); $self->{'param_out'}{$key} ||= $self->{$key} unless ($key eq 'param_out'); } @@ -158,13 +140,10 @@ sub respond { ## An action may redirect to an external URL if ($self->{'url_redirection'}) { -#$self->{logger}->log(level => LOG_TRACE, message => "URL Redirect : $self->{'url_redirection'}"); printf "Location: %s\n\n", $self->{'url_redirection'}; } else { -#$self->{'param_out'}{'cookie'} = CGI::Cookie->new(-name=>'as_user',-value=>$self->{'as_user'},-expires=>'-1M'); - ## Parse template my $tt2 = Template->new( { @@ -312,7 +291,6 @@ sub req_select_sp { entityid => $self->{'param_in'}{'sp_entityid'}); ## Prepare data -#open TMP, ">/tmp/account_manager_metadata.dump"; IdPAccountManager::Tools::dump_var($federation_metadata->{'federation_metadata_as_hashref'}[0], 0, \*TMP); close TMP; my $sp_metadata_as_hashref = $federation_metadata->{'federation_metadata_as_hashref'}[0]; my @contacts;