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

start with second step if there is just one federation

parent 4355cc72
No related branches found
No related tags found
No related merge requests found
...@@ -33,6 +33,7 @@ my $entity_id_pattern = qr{ ...@@ -33,6 +33,7 @@ my $entity_id_pattern = qr{
my %actions = ( my %actions = (
home => 'req_home', home => 'req_home',
start => 'req_start',
select_federation => 'req_select_federation', select_federation => 'req_select_federation',
select_sp => 'req_select_sp', select_sp => 'req_select_sp',
select_email => 'req_select_email', select_email => 'req_select_email',
...@@ -131,7 +132,6 @@ sub new { ...@@ -131,7 +132,6 @@ sub new {
sub run { sub run {
my ($self) = @_; my ($self) = @_;
# process input parameters # process input parameters
my %parameters = $self->{cgi}->Vars(); my %parameters = $self->{cgi}->Vars();
...@@ -207,6 +207,19 @@ sub respond { ...@@ -207,6 +207,19 @@ sub respond {
exit 0; exit 0;
} }
sub req_start {
my ($self) = @_;
my @federations = keys %{$self->{configuration}->{federations}};
if (@federations == 1) {
$self->{in}->{federation} = $federations[0];
$self->req_select_sp();
} else {
$self->req_select_federation();
}
}
sub req_select_federation { sub req_select_federation {
my ($self) = @_; my ($self) = @_;
......
...@@ -17,6 +17,6 @@ ...@@ -17,6 +17,6 @@
<h2>[% lh.maketext("Get started") %]</h2> <h2>[% lh.maketext("Get started") %]</h2>
<p>[% lh.maketext("To start testing your own services, start by selecting one your are administrator for.") %]</p> <p>[% lh.maketext("To start testing your own services, start by selecting one your are administrator for.") %]</p>
<p class="text-center"><a href="[% app.url %]?action=select_federation" class="button">[% lh.maketext("Get started") %]</a></p> <p class="text-center"><a href="[% app.url %]?action=start" class="button">[% lh.maketext("Get started") %]</a></p>
[% END %] [% END %]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment