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

usage of banner depends on context, not content

parent ff4c8ab7
No related branches found
No related tags found
No related merge requests found
...@@ -211,7 +211,7 @@ sub req_select_email { ...@@ -211,7 +211,7 @@ sub req_select_email {
unless ($self->{in}->{entityid}) { unless ($self->{in}->{entityid}) {
$self->{logger}->error("Missing parameter entityid"); $self->{logger}->error("Missing parameter entityid");
$self->respond( $self->respond(
template => 'index.tt2.html', template => 'index-nobanner.tt2.html',
data => { data => {
content => 'errors.tt2.html', content => 'errors.tt2.html',
errors => [ "missing_entityid" ] errors => [ "missing_entityid" ]
...@@ -239,7 +239,7 @@ sub req_select_email { ...@@ -239,7 +239,7 @@ sub req_select_email {
if ($EVAL_ERROR) { if ($EVAL_ERROR) {
$self->{logger}->error("Failed to load federation metadata: $EVAL_ERROR"); $self->{logger}->error("Failed to load federation metadata: $EVAL_ERROR");
$self->respond( $self->respond(
template => 'index.tt2.html', template => 'index-nobanner.tt2.html',
data => { data => {
content => 'errors.tt2.html', content => 'errors.tt2.html',
errors => [ "internal" ] errors => [ "internal" ]
...@@ -253,7 +253,7 @@ sub req_select_email { ...@@ -253,7 +253,7 @@ sub req_select_email {
"No such SP '%s' in metadata", $self->{in}->{entityid} "No such SP '%s' in metadata", $self->{in}->{entityid}
); );
$self->respond( $self->respond(
template => 'index.tt2.html', template => 'index-nobanner.tt2.html',
data => { data => {
content => 'errors.tt2.html', content => 'errors.tt2.html',
errors => [ "no_such_entity" ] errors => [ "no_such_entity" ]
...@@ -271,7 +271,7 @@ sub req_select_email { ...@@ -271,7 +271,7 @@ sub req_select_email {
unless ($provider->save()) { unless ($provider->save()) {
$self->{logger}->error("Failed to save service provider object"); $self->{logger}->error("Failed to save service provider object");
$self->respond( $self->respond(
template => 'index.tt2.html', template => 'index-nobanner.tt2.html',
data => { data => {
content => 'errors.tt2.html', content => 'errors.tt2.html',
errors => [ "internal" ] errors => [ "internal" ]
...@@ -310,7 +310,7 @@ sub req_complete_challenge { ...@@ -310,7 +310,7 @@ sub req_complete_challenge {
unless ($self->{in}->{entityid}) { unless ($self->{in}->{entityid}) {
$self->{logger}->error("Missing parameter entityid"); $self->{logger}->error("Missing parameter entityid");
$self->respond( $self->respond(
template => 'index.tt2.html', template => 'index-nobanner.tt2.html',
data => { data => {
errors => [ "missing_entityid" ] errors => [ "missing_entityid" ]
} }
...@@ -320,7 +320,7 @@ sub req_complete_challenge { ...@@ -320,7 +320,7 @@ sub req_complete_challenge {
unless ($self->{in}->{email}) { unless ($self->{in}->{email}) {
$self->{logger}->error("Missing parameter email"); $self->{logger}->error("Missing parameter email");
$self->respond( $self->respond(
template => 'index.tt2.html', template => 'index-nobanner.tt2.html',
data => { data => {
content => 'errors.tt2.html', content => 'errors.tt2.html',
errors => [ "missing_email" ] errors => [ "missing_email" ]
...@@ -336,7 +336,7 @@ sub req_complete_challenge { ...@@ -336,7 +336,7 @@ sub req_complete_challenge {
unless ($provider->load(speculative => 1)) { unless ($provider->load(speculative => 1)) {
$self->{logger}->errorf("No such SP '%s' in database", $self->{in}->{entityid}); $self->{logger}->errorf("No such SP '%s' in database", $self->{in}->{entityid});
$self->respond( $self->respond(
template => 'index.tt2.html', template => 'index-nobanner.tt2.html',
data => { data => {
content => 'errors.tt2.html', content => 'errors.tt2.html',
errors => [ "no_such_entity" ] errors => [ "no_such_entity" ]
...@@ -368,7 +368,7 @@ sub req_complete_challenge { ...@@ -368,7 +368,7 @@ sub req_complete_challenge {
$self->{in}->{email} $self->{in}->{email}
); );
$self->respond( $self->respond(
template => 'index.tt2.html', template => 'index-nobanner.tt2.html',
data => { data => {
content => 'errors.tt2.html', content => 'errors.tt2.html',
errors => [ "internal" ] errors => [ "internal" ]
...@@ -390,7 +390,7 @@ sub req_complete_challenge { ...@@ -390,7 +390,7 @@ sub req_complete_challenge {
$old_token->id() $old_token->id()
); );
$self->respond( $self->respond(
template => 'index.tt2.html', template => 'index-nobanner.tt2.html',
data => { data => {
content => 'errors.tt2.html', content => 'errors.tt2.html',
errors => [ "internal" ] errors => [ "internal" ]
...@@ -414,7 +414,7 @@ sub req_complete_challenge { ...@@ -414,7 +414,7 @@ sub req_complete_challenge {
unless ($token->save()) { unless ($token->save()) {
$self->{logger}->error("Failed to save authentication token"); $self->{logger}->error("Failed to save authentication token");
$self->respond( $self->respond(
template => 'index.tt2.html', template => 'index-nobanner.tt2.html',
data => { data => {
content => 'errors.tt2.html', content => 'errors.tt2.html',
errors => [ "internal" ] errors => [ "internal" ]
...@@ -430,7 +430,7 @@ sub req_complete_challenge { ...@@ -430,7 +430,7 @@ sub req_complete_challenge {
open(my $handle, '|-', "$sendmail -f $sender $recipient") or do { open(my $handle, '|-', "$sendmail -f $sender $recipient") or do {
$self->{logger}->errorf("Unable to run sendmail executable: %s", $ERRNO); $self->{logger}->errorf("Unable to run sendmail executable: %s", $ERRNO);
$self->respond( $self->respond(
template => 'index.tt2.html', template => 'index-nobanner.tt2.html',
data => { data => {
content => 'errors.tt2.html', content => 'errors.tt2.html',
errors => [ "mail_notification_error" ] errors => [ "mail_notification_error" ]
...@@ -461,7 +461,7 @@ sub req_complete_challenge { ...@@ -461,7 +461,7 @@ sub req_complete_challenge {
unless ($tt2->process($template, $data, $handle)) { unless ($tt2->process($template, $data, $handle)) {
$self->{logger}->errorf("Mail notification error: %s", $tt2->error()); $self->{logger}->errorf("Mail notification error: %s", $tt2->error());
$self->respond( $self->respond(
template => 'index.tt2.html', template => 'index-nobanner.tt2.html',
data => { data => {
content => 'errors.tt2.html', content => 'errors.tt2.html',
errors => [ "mail_notification_error" ] errors => [ "mail_notification_error" ]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment