Skip to content

Commit 090a02c

Browse files
committed
Bugfixes for 2.0 port
1 parent be7676c commit 090a02c

3 files changed

Lines changed: 20 additions & 16 deletions

File tree

src/Auth/Process/SFO.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ public function __construct(array $config, $reserved)
5858
$this->idpMetadata = $this->getIdPMetadata($config['idpEntityid']);
5959

6060
$config['AuthnContextClassRef'] = $config['loa'];
61+
$config['entityid'] = $config['entityID'];
6162
$this->metadata = Configuration::loadFromArray($config);
6263
}
6364

src/Controller/SFO.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public function acs(): Template
6969
throw new Error\BadRequest('Invalid message received to SFO AssertionConsumerService endpoint.');
7070
}
7171

72-
$issuer = $response->getIssuer();
72+
$issuer = $response->getIssuer()->getValue();
7373
$relaystate = $response->getRelayState();
7474
$inResponseTo = $response->getInResponseTo();
7575

@@ -110,7 +110,7 @@ public function acs(): Template
110110
// the status of the response wasn't "success"
111111
Logger::debug('SFO - status response received, showing error page.');
112112

113-
$t = new Template($this->config, 'stepupsfo:handlestatus.php');
113+
$t = new Template($this->config, 'stepupsfo:handlestatus.twig');
114114
$t->data['status'] = $e->getStatus();
115115
$t->data['subStatus'] = $e->getSubStatus();
116116
$t->data['statusMessage'] = $e->getStatusMessage();

templates/handlestatus.twig

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,30 +6,33 @@
66

77
{% if status == "urn:oasis:names:tc:SAML:2.0:status:Responder" and subStatus == "urn:oasis:names:tc:SAML:2.0:status:AuthnFailed" %}
88

9-
<p>{{ 'Authentication not successful:' | trans }}<br/><br/>
9+
<p>{{ 'Authentication not successful:' | trans }}<br/><br/>
1010

11-
<strong>
12-
{{ statusMessage }}
13-
</strong></p>
11+
<strong>
12+
{{ statusMessage }}
13+
</strong></p>
1414

1515
{% elseif status == "urn:oasis:names:tc:SAML:2.0:status:Responder" and subStatus == "urn:oasis:names:tc:SAML:2.0:status:NoAuthnContext" %}
1616

17-
<p>{{ 'You could not be authenticated at the requested level.' | trans }}<br/>
17+
<p>{{ 'You could not be authenticated at the requested level.' | trans }}<br/>
1818

19-
{{ statusMessage }}</p>
19+
{{ statusMessage }}</p>
2020

21-
<p>{{ 'Do you have a token registered with the required level?' | trans }}<br/><br/>
22-
{% trans %}Please go to the <a href="{{ selfserviceUrl }}">Selfservice Registration Portal</a>
23-
to review or enroll your token.{% endtrans %}</p>
21+
<p>{{ 'Do you have a token registered with the required level?' | trans }}<br/><br/>
22+
23+
{% if selfserviceUrl %}
24+
{{ 'Please go to the <a href="%URL%">Selfservice Registration Portal</a>
25+
to review or enroll your token.' | trans({'%URL%': selfserviceUrl })|raw }}</p>
26+
{% endif %}
2427

2528
{% else %}
2629

27-
<p>Unexpected error occurred while performing second factor authentication.<br/><br/>
28-
{{ status }}<br/>
29-
{{ subStatus }}<br/>
30-
{{ statusMessage }}</p>
30+
<p>{{ 'Unexpected error occurred while performing second factor authentication.' | trans }}<br/><br/>
31+
{{ status }}<br/>
32+
{{ subStatus }}<br/>
33+
{{ statusMessage }}</p>
3134

32-
<p>Please try again or contact your support desk.</p>
35+
<p>{{ 'Please try again or contact your support desk.' | trans }}</p>
3336

3437
{% endif %}
3538

0 commit comments

Comments
 (0)