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

make authentication optional

parent 82e6ed02
Branches
Tags
No related merge requests found
...@@ -250,7 +250,8 @@ sub abort { ...@@ -250,7 +250,8 @@ sub abort {
sub req_select_federation { sub req_select_federation {
my ($self, %args) = @_; my ($self, %args) = @_;
$self->check_authentication(action => 'select_federation'); $self->check_authentication(action => 'select_federation')
if $self->{configuration}->{app}->{login_url};
my $federations = $self->{configuration}->{federations}->{list}; my $federations = $self->{configuration}->{federations}->{list};
my @federations = split(/, */, $federations); my @federations = split(/, */, $federations);
...@@ -278,7 +279,8 @@ sub req_select_federation { ...@@ -278,7 +279,8 @@ sub req_select_federation {
sub req_select_sp { sub req_select_sp {
my ($self, %args) = @_; my ($self, %args) = @_;
$self->check_authentication(action => 'select_sp'); $self->check_authentication(action => 'select_sp')
if $self->{configuration}->{app}->{login_url};
my $federation = $self->{cgi}->param('federation'); # not mandatory my $federation = $self->{cgi}->param('federation'); # not mandatory
...@@ -318,7 +320,8 @@ sub req_select_sp { ...@@ -318,7 +320,8 @@ sub req_select_sp {
sub req_select_email { sub req_select_email {
my ($self, %args) = @_; my ($self, %args) = @_;
$self->check_authentication(action => 'select_email'); $self->check_authentication(action => 'select_email')
if $self->{configuration}->{app}->{login_url};
my $entityid = $self->get_parameter(name => 'entityid'); my $entityid = $self->get_parameter(name => 'entityid');
my $federation = $self->{cgi}->param('federation'); # not mandatory my $federation = $self->{cgi}->param('federation'); # not mandatory
...@@ -402,7 +405,8 @@ sub req_select_email { ...@@ -402,7 +405,8 @@ sub req_select_email {
sub req_complete_challenge { sub req_complete_challenge {
my ($self, %args) = @_; my ($self, %args) = @_;
$self->check_authentication(action => 'complete_challenge'); $self->check_authentication(action => 'complete_challenge')
if $self->{configuration}->{app}->{login_url};
my $entityid = $self->get_parameter(name => 'entityid'); my $entityid = $self->get_parameter(name => 'entityid');
my $email = $self->get_parameter(name => 'email'); my $email = $self->get_parameter(name => 'email');
...@@ -587,7 +591,8 @@ sub req_complete_challenge { ...@@ -587,7 +591,8 @@ sub req_complete_challenge {
sub req_create_accounts { sub req_create_accounts {
my ($self, %args) = @_; my ($self, %args) = @_;
$self->check_authentication(action => 'create_accounts'); $self->check_authentication(action => 'create_accounts')
if $self->{configuration}->{app}->{login_url};
my $entityid = $self->get_parameter(name => 'entityid'); my $entityid = $self->get_parameter(name => 'entityid');
my $token = $self->get_parameter(name => 'token'); my $token = $self->get_parameter(name => 'token');
...@@ -691,7 +696,8 @@ sub req_create_accounts { ...@@ -691,7 +696,8 @@ sub req_create_accounts {
sub req_download_accounts { sub req_download_accounts {
my ($self) = @_; my ($self) = @_;
$self->check_authentication(action => 'download_accounts'); $self->check_authentication(action => 'download_accounts')
if $self->{configuration}->{app}->{login_url};
my $entityid = $self->get_parameter(name => 'entityid'); my $entityid = $self->get_parameter(name => 'entityid');
my $token = $self->get_parameter(name => 'token'); my $token = $self->get_parameter(name => 'token');
......
...@@ -9,6 +9,6 @@ ...@@ -9,6 +9,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.login_url %]?target=[% app.url %]%3Faction%3Dselect_federation" class="button">[% lh.maketext("Get started") %]</a></p> <p class="text-center"><a href="[% IF app.login_url %][% app.login_url %]?target=[% app.url %]%3Faction%3Dselect_federation[% ELSE %][% app.url %]?action=select_federation[% END %]" class="button">[% lh.maketext("Get started") %]</a></p>
[% END %] [% END %]
...@@ -9,6 +9,6 @@ ...@@ -9,6 +9,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.login_url %]?target=[% app.url %]%3Faction%3Dselect_federation" class="button">[% lh.maketext("Get started") %]</a></p> <p class="text-center"><a href="[% IF app.login_url %][% app.login_url %]?target=[% app.url %]%3Faction%3Dselect_federation[% ELSE %][% app.url %]?action=select_federation[% END %]" 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