Skip to content

Commit ab6170d

Browse files
committed
Consolidate additional routes
These templates were not using the 'new' translation key convention yet. (the old translation keys are not removed, because `invalid-acs-location` still references them).
1 parent 0150aa8 commit ab6170d

9 files changed

Lines changed: 53 additions & 62 deletions

File tree

languages/messages.en.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,8 @@
178178
'error_authorization_policy_violation_info_no_idp_name' => 'Message from your %organisationNoun%: ',
179179
'error_no_message' => 'Error - No message received',
180180
'error_no_message_desc' => 'We were expecting a SAML message, but did not get one. Something went wrong. Please try again.',
181+
'error_unable_to_receive_message' => 'Error - No message received',
182+
'error_unable_to_receive_message_desc' => 'We were expecting a SAML message, but did not get one. Something went wrong. Please try again.',
181183
'error_invalid_acs_location' => 'The given "Assertion Consumer Service" is unknown or invalid.',
182184
'error_invalid_acs_binding' => 'Error - Invalid ACS binding type',
183185
'error_invalid_acs_binding_desc' => 'The provided or configured "Assertion Consumer Service" Binding Type is unknown or invalid.',
@@ -263,13 +265,13 @@
263265
'error_clock_issue_title' => 'Error - The Assertion is not yet valid or has expired',
264266
'error_clock_issue_desc' => 'This is likely because the difference in time between %idpName% and %suiteName% it too large. Please verify that the time on the %organisationNoun% is correct.',
265267
'error_clock_issue_desc_no_idp_name' => 'This is likely because the difference in time between %organisationNoun% and %suiteName% it too large. Please verify that the time on the IdP is correct.',
266-
'error_stepup_callout_unknown_title' => 'Error - Unknown strong authentication failure',
268+
'error_stepup_callout_unknown' => 'Error - Unknown strong authentication failure',
267269
'error_stepup_callout_unknown_desc' => 'Logging in with strong authentication has failed and we don\'t know exactly why . Please try again first by going back to the service and logging in again . If this doesn\'t work, please contact the service desk of your %organisationNoun%.',
268270
'error_stepup_callout_unmet_loa_title' => 'Error - No suitable token found',
269271
'error_stepup_callout_unmet_loa_desc' => 'To continue to this service, a registered token with a certain level of assurance is required. Currently, you either haven\'t registered a token at all, or the level of assurance of the token you did register is too low. See the link below for more information about the registration process.',
270272
'error_stepup_callout_unmet_loa_link_text' => 'Read more about the registration process.',
271273
'error_stepup_callout_unmet_loa_link_target' => 'https://support.surfconext.nl/stepup-noauthncontext-en',
272-
'error_stepup_callout_user_cancelled_title' => 'Error - Logging in cancelled',
274+
'error_stepup_callout_user_cancelled' => 'Error - Logging in cancelled',
273275
'error_stepup_callout_user_cancelled_desc' => 'You have aborted the login process. Go back to the service if you want to try again.',
274276
'error_metadata_entity_id_not_found' => 'Metadata can not be generated',
275277
'error_metadata_entity_id_not_found_desc' => 'The following error occurred: %message%',

languages/messages.nl.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,8 @@
178178
'error_authorization_policy_violation_info_no_idp_name' => 'Bericht van je %organisationNoun%: ',
179179
'error_no_message' => 'Fout - Geen bericht ontvangen',
180180
'error_no_message_desc' => 'We verwachtten een SAML bericht, maar we hebben er geen ontvangen. Er is iets fout gegaan. Probeer het alstublieft opnieuw.',
181+
'error_unable_to_receive_message' => 'Fout - Geen bericht ontvangen',
182+
'error_unable_to_receive_message_desc' => 'We verwachtten een SAML bericht, maar we hebben er geen ontvangen. Er is iets fout gegaan. Probeer het alstublieft opnieuw.',
181183
'error_invalid_acs_location' => 'De opgegeven "Assertion Consumer Service" is onjuist of bestaat niet.',
182184
'error_invalid_acs_binding' => 'Fout - Onjuist ACS binding type',
183185
'error_invalid_acs_binding_desc' => 'Het opgegeven of geconfigureerde "Assertion Consumer Service" Binding Type is onjuist of bestaat niet.',
@@ -261,13 +263,13 @@
261263
'error_clock_issue_title' => 'Fout - De Assertion is nog niet geldig of is verlopen',
262264
'error_clock_issue_desc' => 'Dit komt waarschijnlijk doordat de tijd tussen %idpName% en %suiteName% te ver uiteen loopt. Controleer de tijd op de %organisationNoun%.',
263265
'error_clock_issue_desc_no_idp_name' => 'Dit komt waarschijnlijk doordat de tijd tussen de %organisationNoun% en %suiteName% te ver uiteen loopt. Controleer de tijd op de IdP.',
264-
'error_stepup_callout_unknown_title' => 'Fout - Onbekend sterke authenticatie probleem',
266+
'error_stepup_callout_unknown' => 'Fout - Onbekend sterke authenticatie probleem',
265267
'error_stepup_callout_unknown_desc' => 'Inloggen met sterke authenticatie is niet gelukt en we weten niet precies waarom. Probeer het eerst eens opnieuw door terug te gaan naar de dienst en opnieuw in te loggen. Lukt dit niet, neem dan contact op met de helpdesk van je %organisationNoun%.',
266268
'error_stepup_callout_unmet_loa_title' => 'Fout - Geen geschikt token gevonden',
267269
'error_stepup_callout_unmet_loa_desc' => 'Om toegang te krijgen tot deze dienst heb je een geregistreerd token nodig met een bepaald zekerheidsniveau. Je hebt nu ofwel geen token geregistreerd, of het zekerheidsniveau van het token dat je hebt geregistreerd is te laag. Volg de link hieronder voor meer informatie over het registratieproces.',
268270
'error_stepup_callout_unmet_loa_link_text' => 'Lees meer over het registratieproces.',
269271
'error_stepup_callout_unmet_loa_link_target' => 'https://support.surfconext.nl/stepup-noauthncontext-nl',
270-
'error_stepup_callout_user_cancelled_title' => 'Fout - Inloggen afgebroken',
272+
'error_stepup_callout_user_cancelled' => 'Fout - Inloggen afgebroken',
271273
'error_stepup_callout_user_cancelled_desc' => 'Je hebt het inloggen afgebroken. Ga terug naar de dienst als je het opnieuw wilt proberen.',
272274
'error_metadata_entity_id_not_found' => 'Metadata kan niet gegenereerd worden',
273275
'error_metadata_entity_id_not_found_desc' => 'De volgende fout is opgetreden: %message%',

languages/messages.pt.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,8 @@
176176
'error_authorization_policy_violation_info_no_idp_name' => 'Mensagem da sua %organisationNoun%: ',
177177
'error_no_message' => 'Erro - Não foi recebido nenhuma mensagem',
178178
'error_no_message_desc' => 'Estávamos a aguardar uma mensagem, mas não chegou nenhuma? Alguma coisa correu mal. Tente de novo por favor.',
179+
'error_unable_to_receive_message' => 'Erro - Não foi recebido nenhuma mensagem',
180+
'error_unable_to_receive_message_desc' => 'Estávamos a aguardar uma mensagem, mas não chegou nenhuma? Alguma coisa correu mal. Tente de novo por favor.',
179181
'error_invalid_acs_location' => 'O "Serviço de Consumidor de Asserção" fornecido é desconhecido ou inválido.',
180182
'error_invalid_acs_binding' => 'O ACS "Binding Type" é inválido',
181183
'error_invalid_acs_binding_desc' => 'O "Binding Type" do "Serviço de Consumidor de Asserção" fornecido ou configurado é desconhecido ou inválido.',
@@ -255,13 +257,13 @@
255257
'error_clock_issue_title' => 'Erro - A asserção ainda não é válida ou pode ter expirado',
256258
'error_clock_issue_desc' => '<p>Por favor, verifique se a hora no IdP está correta.</p>',
257259
'error_clock_issue_desc_no_idp_name' => '<p>Por favor, verifique se a hora no IdP está correta.</p>',
258-
'error_stepup_callout_unknown_title' => 'Erro - falha por autenticação forte desconhecida',
260+
'error_stepup_callout_unknown' => 'Erro - falha por autenticação forte desconhecida',
259261
'error_stepup_callout_unknown_desc' => 'O login com autenticação forte falhou e não sabemos exatamente qual o motivo. Tente aceder de novo ao serviço e efetuar uma nova autenticação. Se voltar a não funcionar, entre em contato com o suporte técnico da sua %organisationNoun%.',
260262
'error_stepup_callout_unmet_loa_title' => 'Erro - não foi encontrado nenhum token adequado',
261263
'error_stepup_callout_unmet_loa_desc' => 'Para continuar neste serviço, é necessário que o token registado tenho um determinado nível de confiança. Atualmente, você não tem um token registado, ou o nível de confiança do seu token é muito baixo. Veja o endereço abaixo para mais informações sobre o processo de registo.',
262264
'error_stepup_callout_unmet_loa_link_text' => 'Leia mais sobre o processo de registro.',
263265
'error_stepup_callout_unmet_loa_link_target' => 'https://support.surfconext.nl/stepup-noauthncontext',
264-
'error_stepup_callout_user_cancelled_title' => 'Erro - Carregamento cancelado',
266+
'error_stepup_callout_user_cancelled' => 'Erro - Carregamento cancelado',
265267
'error_stepup_callout_user_cancelled_desc' => 'Você cancelou o processo de autenticação. Volte ao serviço se você pretender tentar de novo.',
266268
'error_metadata_entity_id_not_found' => 'Metadata can not be generated',
267269
'error_metadata_entity_id_not_found_desc' => 'The following error occurred: %message%',

src/OpenConext/EngineBlockBundle/Controller/FeedbackController.php

Lines changed: 23 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -52,17 +52,12 @@ public function __construct(
5252
#[Route(
5353
path: '/authentication/feedback/unable-to-receive-message',
5454
name: 'authentication_feedback_unable_to_receive_message',
55+
defaults: [
56+
'pageIdentifier' => 'unable-to-receive-message',
57+
'statusCode' => 400
58+
],
5559
methods: ['GET']
56-
)
57-
]
58-
public function unableToReceiveMessageAction()
59-
{
60-
return new Response(
61-
$this->twig->render('@theme/Authentication/View/Feedback/unable-to-receive-message.html.twig'),
62-
400
63-
);
64-
}
65-
60+
)]
6661
#[Route(
6762
path: '/authentication/feedback/unsolicited-response',
6863
name: 'authentication_feedback_unsolicited_response',
@@ -126,6 +121,24 @@ public function unableToReceiveMessageAction()
126121
],
127122
methods: ['GET']
128123
)]
124+
#[Route(
125+
path: '/authentication/feedback/stepup-callout-unknown',
126+
name: 'authentication_feedback_stepup_callout_unknown',
127+
defaults: [
128+
'pageIdentifier' => 'stepup-callout-unknown',
129+
'statusCode' => 400
130+
],
131+
methods: ['GET']
132+
)]
133+
#[Route(
134+
path: '/authentication/feedback/stepup-callout-user-cancelled',
135+
name: 'authentication_feedback_stepup_callout_user_cancelled',
136+
defaults: [
137+
'pageIdentifier' => 'stepup-callout-user-cancelled',
138+
'statusCode' => 400
139+
],
140+
methods: ['GET']
141+
)]
129142
public function feedbackAction(string $pageIdentifier, int $statusCode): Response
130143
{
131144
return new Response(
@@ -493,19 +506,6 @@ public function clockIssueAction()
493506
);
494507
}
495508

496-
#[Route(
497-
path: '/authentication/feedback/stepup-callout-user-cancelled',
498-
name: 'authentication_feedback_stepup_callout_user_cancelled',
499-
methods: ['GET']
500-
)]
501-
public function stepupCalloutUserCancelledAction(Request $request)
502-
{
503-
return new Response(
504-
$this->twig->render('@theme/Authentication/View/Feedback/stepup-callout-user-cancelled.html.twig'),
505-
400
506-
);
507-
}
508-
509509
#[Route(path: '/authentication/feedback/stepup-callout-unmet-loa', name: 'authentication_feedback_stepup_callout_unmet_loa', methods: ['GET'])]
510510
public function stepupCalloutUnmetLoaAction(Request $request)
511511
{
@@ -515,15 +515,6 @@ public function stepupCalloutUnmetLoaAction(Request $request)
515515
);
516516
}
517517

518-
#[Route(path: '/authentication/feedback/stepup-callout-unknown', name: 'authentication_feedback_stepup_callout_unknown', methods: ['GET'])]
519-
public function stepupCalloutUnknownAction(Request $request)
520-
{
521-
return new Response(
522-
$this->twig->render('@theme/Authentication/View/Feedback/stepup-callout-unknown.html.twig'),
523-
400
524-
);
525-
}
526-
527518
private function setFeedbackInformationOnSession(array $customFeedbackInfo): void
528519
{
529520
$this->feedbackStateHelper->mergeFeedbackInfo($customFeedbackInfo);

src/OpenConext/EngineBlockFunctionalTestingBundle/Features/FeedbackFooters.feature

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,18 @@ Feature:
5353
When I go to Engineblock URL "/authentication/feedback/session-lost"
5454
Then I should see "your session was lost"
5555

56+
Scenario: The unable-to-receive-message feedback route renders correctly
57+
When I go to Engineblock URL "/authentication/feedback/unable-to-receive-message"
58+
Then I should see "No message received"
59+
60+
Scenario: The stepup-callout-unknown feedback route renders correctly
61+
When I go to Engineblock URL "/authentication/feedback/stepup-callout-unknown"
62+
Then I should see "Unknown strong authentication failure"
63+
64+
Scenario: The stepup-callout-user-cancelled feedback route renders correctly
65+
When I go to Engineblock URL "/authentication/feedback/stepup-callout-user-cancelled"
66+
Then I should see "Logging in cancelled"
67+
5668
Scenario: When a IdP specific error page is shown and a translation is not configured the support emailaddress of the IdP should be hidden
5769
Given The clock on the IdP "Dummy Idp" is ahead
5870
And I have configured the following translations:

theme/base/templates/modules/Authentication/View/Feedback/generic-error.html.twig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
{% extends '@theme/Default/View/Error/error.html.twig' %}
22

3+
{#
4+
# Possible translation keys: error_session_lost, error_session_not_started, error_unsolicited_response,
5+
# error_invalid_acs_binding, error_received_error_status_code, error_unable_to_receive_message,
6+
# error_unknown_requesterid_in_authnrequest, error_authentication_limit_exceeded,
7+
# error_stepup_callout_unknown, error_stepup_callout_user_cancelled
8+
#}
39
{% set _key = 'error_' ~ pageIdentifier|replace({'-': '_'}) %}
410
{% set pageTitle = (_key)|trans %}
511
{% block pageTitle %}{{ pageTitle }}{% endblock %}

theme/base/templates/modules/Authentication/View/Feedback/stepup-callout-unknown.html.twig

Lines changed: 0 additions & 8 deletions
This file was deleted.

theme/base/templates/modules/Authentication/View/Feedback/stepup-callout-user-cancelled.html.twig

Lines changed: 0 additions & 8 deletions
This file was deleted.

theme/base/templates/modules/Authentication/View/Feedback/unable-to-receive-message.html.twig

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)