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

enforce consistent name for each steps

parent b20ab2de
No related branches found
No related tags found
No related merge requests found
......@@ -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();
}
......
......@@ -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>
......
[% 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 %]
......
<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>
......
......@@ -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';
});
});
......
......@@ -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>
......
<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>
......
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