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

keep federation to allows getting back anytime

parent 995761a5
Branches
Tags
No related merge requests found
...@@ -407,7 +407,8 @@ sub req_select_email { ...@@ -407,7 +407,8 @@ sub req_select_email {
$self->respond( $self->respond(
template => 'select_email.tt2.html', template => 'select_email.tt2.html',
data => { data => {
sp => $sp, federation => $federation,
sp => $sp,
} }
); );
} }
...@@ -415,6 +416,29 @@ sub req_select_email { ...@@ -415,6 +416,29 @@ sub req_select_email {
sub req_complete_challenge { sub req_complete_challenge {
my ($self) = @_; my ($self) = @_;
my $federation = $self->{in}->{federation};
if (!$federation) {
$self->{logger}->error("Missing parameter: federation");
$self->respond(
template => 'errors.tt2.html',
data => {
errors => [ "missing_federation" ]
}
);
}
my $file = $self->{configuration}->{federations}->{$federation};
if (!$file) {
$self->{logger}->error("Incorrect parameter: federation");
$self->respond(
template => 'errors.tt2.html',
data => {
errors => [ "invalid_federation" ]
}
);
}
unless ($self->{in}->{entityid}) { unless ($self->{in}->{entityid}) {
$self->{logger}->error("Missing parameter entityid"); $self->{logger}->error("Missing parameter entityid");
$self->respond( $self->respond(
...@@ -584,8 +608,9 @@ sub req_complete_challenge { ...@@ -584,8 +608,9 @@ sub req_complete_challenge {
$self->respond( $self->respond(
template => 'complete_challenge.tt2.html', template => 'complete_challenge.tt2.html',
data => { data => {
email => $self->{in}->{email}, federation => $federation,
entityid => $self->{in}->{entityid}, entityid => $self->{in}->{entityid},
email => $self->{in}->{email},
} }
); );
} }
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
<label for="token">[% lh.maketext("Please provide the validation token here:") %]</label> <label for="token">[% lh.maketext("Please provide the validation token here:") %]</label>
<br/> <br/>
<input name="token" value="" id="token" type="text" class="required error"/> <input name="token" value="" id="token" type="text" class="required error"/>
<input type="hidden" name="federation" value="[% federation %]"/>
<input type="hidden" name="entityid" value="[% entityid %]"/> <input type="hidden" name="entityid" value="[% entityid %]"/>
<input type="hidden" name="email" value="[% email %]"/> <input type="hidden" name="email" value="[% email %]"/>
</div> </div>
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
<br/> <br/>
[% END %] [% END %]
<div class="callout primary">[% lh.maketext("Those email addresses have been extracted from your service metadata.") %]</div> <div class="callout primary">[% lh.maketext("Those email addresses have been extracted from your service metadata.") %]</div>
<input type="hidden" name="federation" value="[% federation %]"/>
<input type="hidden" name="entityid" value="[% sp.entityid %]"/> <input type="hidden" name="entityid" value="[% sp.entityid %]"/>
[% ELSE %] [% ELSE %]
<p> <p>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment