diff --git a/lib/AccountManager/WebRequest.pm b/lib/AccountManager/WebRequest.pm index 35c4e8c7d13db046035d47365b317705c32b7629..1a140dbd5dd59a7f03c8834441fcc0f927459f8d 100644 --- a/lib/AccountManager/WebRequest.pm +++ b/lib/AccountManager/WebRequest.pm @@ -30,11 +30,11 @@ my %format = ( ); my %actions = ( - select_sp => 'req_select_sp', - account_wizard => 'req_account_wizard', - generate_token => 'req_generate_token', - validate_token => 'req_validate_token', - home => 'req_home', + home => 'req_home', + select_sp => 'req_select_sp', + select_email => 'req_select_email', + complete_challenge => 'req_complete_challenge', + create_accounts => 'req_create_accounts', ); ## New web request @@ -176,8 +176,7 @@ sub respond { } -## Return the list of known SPs first -sub req_account_wizard { +sub req_select_sp { my ($self) = @_; my $metadata; @@ -195,14 +194,10 @@ sub req_account_wizard { $self->{out}->{metadata} = $metadata->parse(type => 'sp'); - $self->{out}->{subtitle} = 'Select your Service Provider'; - $self->respond(); } -## Select a Service Provider and return metadata sctucture for the SP -## Sample URL : https://dev-edugain.renater.fr/accountmanager?action=select_sp&entityid=http%3A%2F%2Fsp.lat.csc.fi -sub req_select_sp { +sub req_select_email { my ($self) = @_; unless ($self->{in}->{entityid}) { @@ -273,14 +268,11 @@ sub req_select_sp { } $self->{out}->{provider} = $provider; - $self->{out}->{subtitle} = 'Select your Service Provider'; $self->respond(); } -## Generate an authentication token to validate an email address -## Sample call : dev-edugain.renater.fr/accountmanager?action=generate_token&style=nobanner&entityid=https%3A%2F%2Fsourcesup.cru.fr%2Fshibboleth&email=support%40renater.fr -sub req_generate_token { +sub req_complete_challenge { my ($self) = @_; unless ($self->{in}->{entityid}) { @@ -371,7 +363,6 @@ sub req_generate_token { $self->{out}->{email} = $self->{in}->{email}; $self->{out}->{entityid} = $self->{in}->{entityid}; - $self->{out}->{subtitle} = 'Generate an authentication token'; my $sender = $self->{configuration}->{_}->{notice_from}; my $recipient = $self->{in}->{email}; @@ -422,10 +413,7 @@ sub req_generate_token { $self->respond(); } -## Validate an authentication token -## Test accounts get created -## Sample call : dev-edugain.renater.fr/accountmanager?action=validate_token&style=nobanner&entityid=https%3A%2F%2Fsourcesup.cru.fr%2Fshibboleth&token=c1cfecb51ea40d39a695 -sub req_validate_token { +sub req_create_accounts { my ($self) = @_; unless ($self->{in}->{entityid}) { @@ -538,7 +526,6 @@ sub req_validate_token { $self->{out}->{entityid} = $self->{in}->{entityid}; $self->{out}->{accounts} = \@accounts; - $self->{out}->{subtitle} = 'Complete Email Challenge'; $self->respond(); } diff --git a/templates/web/account_wizard.tt2.html b/templates/web/account_wizard.tt2.html index 849884efb90c15963df01b9a04b9192e1e9399df..fc5e2fcec185a8ee4efe5c454c7ef082fd600a3d 100644 --- a/templates/web/account_wizard.tt2.html +++ b/templates/web/account_wizard.tt2.html @@ -19,9 +19,9 @@ jQuery(document).ready(function($){ { form.steps("remove", 1); form.steps("insert", 1, { - title: "Send email challenge", + title: "Select your email address", contentMode: "async", - contentUrl: "[% conf.app_url %]?action=select_sp&style=nobanner&entityid="+ + contentUrl: "[% conf.app_url %]?action=select_email&style=nobanner&entityid="+ encodeURIComponent($('#entityid').val()) }); } @@ -32,9 +32,9 @@ jQuery(document).ready(function($){ { form.steps("remove", 2); form.steps("insert", 2, { - title: "Complete Email Challenge", + title: "Complete email challenge", contentMode: "async", - contentUrl: "[% conf.app_url %]?action=generate_token&style=nobanner&entityid="+ + contentUrl: "[% conf.app_url %]?action=complete_challenge&style=nobanner&entityid="+ encodeURIComponent($('#entityid').val())+"&email="+encodeURIComponent($("input:checked[name='email']").val()) }); } @@ -43,7 +43,7 @@ jQuery(document).ready(function($){ // Result gets included in the next tab if (currentIndex === 2 && newIndex === 3) { - window.location="[% conf.app_url %]?action=validate_token&entityid="+ + window.location="[% conf.app_url %]?action=create_accounts&entityid="+ encodeURIComponent($('#entityid').val())+"&token="+encodeURIComponent($('#token').val()); } @@ -119,15 +119,15 @@ Note that only Service Providers are in the list which are included in the eduGA </div> </fieldset> -<h3>Send email challenge</h3> +<h3>Select your email address</h3> <fieldset> <div data-mode="async" data-url="/rest/service/0"></div> </fieldset> -<h3>Complete Email Challenge</h3> +<h3>Complete email challenge</h3> <fieldset></fieldset> -<h3>Test Accounts</h3> +<h3>Test accounts</h3> <fieldset></fieldset> diff --git a/templates/web/content.tt2.html b/templates/web/content.tt2.html index db63e0351bc9fc32633d167122cdb10e50d5eb9b..a1fe2682b86380c5c115db97c4aff31fcb683e3a 100644 --- a/templates/web/content.tt2.html +++ b/templates/web/content.tt2.html @@ -1,34 +1,27 @@ [% IF action == 'select_sp' %] - [% TRY %] - [% PROCESS 'web/select_sp.tt2.html' %] - [% CATCH %] - An error occured - [% END %] - -[% ELSIF action == 'account_wizard' %] [% TRY %] [% PROCESS 'web/account_wizard.tt2.html' %] [% CATCH %] An error occured [% END %] - [% ELSIF action == 'select_sp' %] + [% ELSIF action == 'select_email' %] [% TRY %] [% PROCESS 'web/select_sp.tt2.html' %] [% CATCH %] An error occured [% END %] -[% ELSIF action == 'generate_token' %] +[% ELSIF action == 'complete_challenge' %] [% TRY %] [% PROCESS 'web/generate_token.tt2.html' %] [% CATCH %] An error occured [% END %] -[% ELSIF action == 'validate_token' %] +[% ELSIF action == 'create_accounts' %] [% TRY %] [% PROCESS 'web/validate_token.tt2.html' %] [% CATCH %] diff --git a/templates/web/generate_token.tt2.html b/templates/web/generate_token.tt2.html index efad31b52f8e1f3486c6a52c258a81d92fe67b22..39ffa612d766b77435e32adb773bd4ad545ec8ad 100644 --- a/templates/web/generate_token.tt2.html +++ b/templates/web/generate_token.tt2.html @@ -1,4 +1,4 @@ -<h3>Complete Email Challenge</h3> +<h3>Complete email challenge</h3> <div> An email challenge including a validation token has been emailed to you at [% email %]. Please copy and paste the validation token in the form below to proof that you are administrator of this service.</div> diff --git a/templates/web/home.tt2.html b/templates/web/home.tt2.html index 1e4597e0d59540dabcc3c7f7dba003df8e2083f1..e3ada94ae27dcc860cbade116abad8ed1c7f7949 100644 --- a/templates/web/home.tt2.html +++ b/templates/web/home.tt2.html @@ -3,7 +3,7 @@ $(function() { $('#start_testing').on('click',function() { - window.location.href='[% conf.app_url %]?action=account_wizard'; + window.location.href='[% conf.app_url %]?action=select_sp'; }); }); diff --git a/templates/web/index.tt2.html b/templates/web/index.tt2.html index 53fce369783a19cdf2a2e748df1fc5b242cd3142..ef63f31a2339410259ee1b684a7d7c00176f103b 100644 --- a/templates/web/index.tt2.html +++ b/templates/web/index.tt2.html @@ -181,7 +181,7 @@ jQuery(function($){ //--> </script> - <title>[% IF subtitle %][% title %] - [% subtitle %][% ELSE %][% title %][% END %]</title> + <title>[% title %]</title> </head> @@ -193,7 +193,7 @@ jQuery(function($){ <li class="logo align-right"><a href="http://www.geant.net" title="Geant home page" target="_blank"><img alt="GEANT logo" width="100" src="images/geant_logo_rgb_300dpi.jpg"/></a></li> </ul> <div class="title"> - <span class=""><h1>[% IF subtitle %][% title %] - [% subtitle %][% ELSE %][% title %][% END %]</h1></span> + <span class=""><h1>[% title %]</h1></span> </div> </header> diff --git a/templates/web/select_sp.tt2.html b/templates/web/select_sp.tt2.html index 82691b21b5d399e50d3e1a925b21fcfc060d0bce..846635343e340eee55512d982ff3665f1512d8f0 100644 --- a/templates/web/select_sp.tt2.html +++ b/templates/web/select_sp.tt2.html @@ -1,4 +1,4 @@ -<h3>Send email challenge</h3> +<h3>Select your email address</h3> <div> Before you can create test accounts at this Identity Provider, we need to ensure you are a legitimate administrator of "[% provider.displayname %]". </div>