diff --git a/lib/AccountManager/App.pm b/lib/AccountManager/App.pm index 4a3575d606c5790f7fc9410ccc182cd57b5a094e..3d2ee7f8170f495c82349c20ea1c97a921a5d0c5 100644 --- a/lib/AccountManager/App.pm +++ b/lib/AccountManager/App.pm @@ -486,9 +486,14 @@ sub req_complete_challenge { PRE_CHOMP => CHOMP_ONE, INCLUDE_PATH => $templates_dir }); - my $source_ip = $ENV{HTTP_X_FORWARDED_FOR} ? - (split(/, /, $ENV{HTTP_X_FORWARDED_FOR}))[0] : - $ENV{REMOTE_ADDR}; + my $user = + $ENV{'HTTP_DISPLAYNAME'} ? $ENV{'HTTP_DISPLAYNAME'} : + $ENV{'displayName'} ? $ENV{'displayName'} : + undef; + my $idp = + $ENV{'HTTP_SHIB_IDENTITY_PROVIDER'} ? $ENV{'HTTP_SHIB_IDENTITY_PROVIDER'} : + $ENV{'Shib-Identity-Provider'} ? $ENV{'Shib-Identity-Provider'} : + undef; my $data = { app => { url => $self->{configuration}->{app}->{url}, @@ -496,9 +501,10 @@ sub req_complete_challenge { version => $self->{configuration}->{app}->{version}, name => $self->{configuration}->{app}->{name}, }, - sourceip => $source_ip, + user => $user, + idp => $idp, + sp => $entityid, to => $email, - entityid => $entityid, token => $token->secret(), challenge_url => sprintf( '%s?action=complete_challenge&entityid=%s&email=%s', diff --git a/lib/AccountManager/L10N/fr.pm b/lib/AccountManager/L10N/fr.pm index 4321058492b17ba09591ad2d750eb96f6c23fc83..5aad649181c5369fb4b3869f006d98adfa62b461 100644 --- a/lib/AccountManager/L10N/fr.pm +++ b/lib/AccountManager/L10N/fr.pm @@ -180,8 +180,8 @@ msgstr "Sélectionnez votre service" #. (sourceip, entityid) #: templates/mail/send_authentication_token.tt2.html:3 templates/mail/send_authentication_token.tt2.txt:2 -msgid "Somebody with IP address %1 has requested to create test accounts for Service Provider with entityID %2." -msgstr "Quelqu'un avec l'adresse IP %1 a demandé la création de comptes de test pour le service %2." +msgid "User %1, authenticated by Identity Provider %2, has requested creation of test accounts for Service Provider %3." +msgstr "L'utilisateur %1, authentifié par le fournisseur d'identité %2, a demandé la création de comptes de test pour le fournisseur de service %3." #: templates/web/edugain/create_accounts.tt2.html:8 templates/web/renater/create_accounts.tt2.html:10 msgid "Test accounts created" diff --git a/templates/mail/send_authentication_token.tt2.html b/templates/mail/send_authentication_token.tt2.html index a9e94e81571f9b6af4fc6344346c017747dabbcc..f4c203a9e6ff35fefa0d43063c5f35d949ce113d 100644 --- a/templates/mail/send_authentication_token.tt2.html +++ b/templates/mail/send_authentication_token.tt2.html @@ -1,6 +1,6 @@ <p> - [% lh.maketext("This is an email challenge automatically sent to you by [_1].", app.name) %] - [% lh.maketext("Somebody with IP address [_1] has requested to create test accounts for Service Provider with entityID [_2].", sourceip, entityid) %] + [% lh.maketext("This is an email challenge automatically sent to you by [_1].", app.name) %] + [% lh.maketext("User [_1], authenticated by Identity Provider [_2], has requested creation of test accounts for Service Provider [_3].", user, idp, sp) %] [% lh.maketext("The address [_1] is mentioned in the federation metadata as a contact for this Service Provider.", to) %] </p> diff --git a/templates/mail/send_authentication_token.tt2.txt b/templates/mail/send_authentication_token.tt2.txt index 182d138ec5842ece982f4a20b37b344ad8fdab42..091a5fb51e64add33926685f9d2b045c152c5d06 100644 --- a/templates/mail/send_authentication_token.tt2.txt +++ b/templates/mail/send_authentication_token.tt2.txt @@ -1,5 +1,5 @@ [% lh.maketext("This is an email challenge automatically sent to you by [_1].", app.name) %] -[% lh.maketext("Somebody with IP address [_1] has requested to create test accounts for Service Provider with entityID [_2].", sourceip, entityid) %] +[% lh.maketext("User [_1], authenticated by Identity Provider [_2], has requested creation of test accounts for Service Provider [_3].", user, idp, sp) %] [% lh.maketext("The address [_1] is mentioned in the federation metadata as a contact for this Service Provider.", to) %] [% lh.maketext("To complete the creation of test accounts, paste the following validation token in [_1]:", app.name) %]