diff --git a/app/Resources/translations/messages.en_GB.xliff b/app/Resources/translations/messages.en_GB.xliff index 0acf41bc..6eb07411 100644 --- a/app/Resources/translations/messages.en_GB.xliff +++ b/app/Resources/translations/messages.en_GB.xliff @@ -1,6 +1,6 @@ - +
The source node in most cases contains the sample message as written by the developer. If it looks like a dot-delimitted string such as "form.label.firstname", then the developer has not provided a default message. @@ -35,72 +35,72 @@ ra.auditlog.action.accredited_as_ra Accredited as RA - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.auditlog.action.accredited_as_raa Accredited as RAA - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.auditlog.action.appointed_as_ra Appointed as RA - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.auditlog.action.appointed_as_raa Appointed as RAA - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.auditlog.action.bootstrapped Identity and Token bootstrapped - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.auditlog.action.created Identity Created - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.auditlog.action.email_changed E-mail changed - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.auditlog.action.email_verified E-mail verified - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.auditlog.action.possession_proven Token possession proven - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.auditlog.action.renamed Name changed - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.auditlog.action.retracted_as_ra Removed as RA(A) - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.auditlog.action.revoked Token revoked - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.auditlog.action.revoked_by_ra Token revoked by RA - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.auditlog.action.vetted Token vetted - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.auditlog.actor @@ -287,12 +287,12 @@ ra.form.extension.ra_role_choice.ra RA - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.form.extension.ra_role_choice.raa RAA - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.form.ra_create_ra_location.label.cancel @@ -338,72 +338,67 @@ ra.form.ra_search_ra_second_factors.button.export Export - /../src/Surfnet/StepupRa/RaBundle/Form/Type/SearchRaSecondFactorsType.php + /../src/Surfnet/StepupRa/RaBundle/Form/Type/SearchRaSecondFactorsType.php ra.form.ra_search_ra_second_factors.button.search Search - /../src/Surfnet/StepupRa/RaBundle/Form/Type/SearchRaSecondFactorsType.php + /../src/Surfnet/StepupRa/RaBundle/Form/Type/SearchRaSecondFactorsType.php ra.form.ra_search_ra_second_factors.choice.status.revoked Removed - /../src/Surfnet/StepupRa/RaBundle/Form/Type/SearchRaSecondFactorsType.php + /../src/Surfnet/StepupRa/RaBundle/Form/Type/SearchRaSecondFactorsType.php ra.form.ra_search_ra_second_factors.choice.status.unverified Not verified - /../src/Surfnet/StepupRa/RaBundle/Form/Type/SearchRaSecondFactorsType.php + /../src/Surfnet/StepupRa/RaBundle/Form/Type/SearchRaSecondFactorsType.php ra.form.ra_search_ra_second_factors.choice.status.verified Verified - /../src/Surfnet/StepupRa/RaBundle/Form/Type/SearchRaSecondFactorsType.php + /../src/Surfnet/StepupRa/RaBundle/Form/Type/SearchRaSecondFactorsType.php ra.form.ra_search_ra_second_factors.choice.status.vetted Activated - /../src/Surfnet/StepupRa/RaBundle/Form/Type/SearchRaSecondFactorsType.php + /../src/Surfnet/StepupRa/RaBundle/Form/Type/SearchRaSecondFactorsType.php ra.form.ra_search_ra_second_factors.choice.type.sms SMS - /../src/Surfnet/StepupRa/RaBundle/Form/Type/SearchRaSecondFactorsType.php - - - ra.form.ra_search_ra_second_factors.choice.type.tiqr - Tiqr - /../src/Surfnet/StepupRa/RaBundle/Form/Type/SearchRaSecondFactorsType.php + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.form.ra_search_ra_second_factors.choice.type.yubikey Yubikey - /../src/Surfnet/StepupRa/RaBundle/Form/Type/SearchRaSecondFactorsType.php + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.form.ra_search_ra_second_factors.label.email E-mail - /../src/Surfnet/StepupRa/RaBundle/Form/Type/SearchRaSecondFactorsType.php + /../src/Surfnet/StepupRa/RaBundle/Form/Type/SearchRaSecondFactorsType.php ra.form.ra_search_ra_second_factors.label.name Name - /../src/Surfnet/StepupRa/RaBundle/Form/Type/SearchRaSecondFactorsType.php + /../src/Surfnet/StepupRa/RaBundle/Form/Type/SearchRaSecondFactorsType.php ra.form.ra_search_ra_second_factors.label.second_factor_id Token ID - /../src/Surfnet/StepupRa/RaBundle/Form/Type/SearchRaSecondFactorsType.php + /../src/Surfnet/StepupRa/RaBundle/Form/Type/SearchRaSecondFactorsType.php ra.form.ra_search_ra_second_factors.label.status Status - /../src/Surfnet/StepupRa/RaBundle/Form/Type/SearchRaSecondFactorsType.php + /../src/Surfnet/StepupRa/RaBundle/Form/Type/SearchRaSecondFactorsType.php ra.form.ra_search_ra_second_factors.label.type Type - /../src/Surfnet/StepupRa/RaBundle/Form/Type/SearchRaSecondFactorsType.php + /../src/Surfnet/StepupRa/RaBundle/Form/Type/SearchRaSecondFactorsType.php ra.form.ra_select_institution.button.select_and_apply @@ -484,7 +479,7 @@ ra.management.amend_ra_info.error.middleware_command_failed The amendment of the RA's information failed due to a server error. - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.management.amend_ra_info.info_amended @@ -572,7 +567,7 @@ ra.management.create_ra.error.middleware_command_failed The identity could not be granted the chosen role due to a server error. - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.management.create_ra.identity_accredited @@ -748,17 +743,17 @@ ra.management.overview.role.value.ra RA - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.management.overview.role.value.raa RAA - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.management.overview.role.value.sraa SRAA - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.management.overview.update_information @@ -838,22 +833,22 @@ ra.prove_phone_possession.challenge_expired Your code has expired. Please request a new code. - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.prove_phone_possession.challenge_response_incorrect This code is not correct. Please try again or request a new code. - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.prove_phone_possession.too_many_attempts You have exceeded the limit of ten attempts; you can no longer attempt verification of any more codes. Contact your helpdesk or try again later. - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.prove_yubikey_possession.different_yubikey_used A different Yubikey was used by the user during the registration process. - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.ra_location.change.title @@ -1045,22 +1040,22 @@ ra.second_factor.search.status.revoked Removed - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.second_factor.search.status.unverified Not verified - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.second_factor.search.status.verified Verified - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.second_factor.search.status.vetted Activated - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.second_factor.search.text.no_second_factors @@ -1080,22 +1075,17 @@ ra.second_factor.search.type.sms SMS - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig - - - ra.second_factor.search.type.tiqr - Tiqr - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.second_factor.search.type.u2f U2F - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.second_factor.search.type.yubikey Yubikey - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.secondfactor.auditlog @@ -1125,7 +1115,7 @@ ra.sms_send_challenge.send_sms_challenge_failed The sending of the code via SMS failed. - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.sraa.changed_institution @@ -1152,12 +1142,12 @@ ra.verify_yubikey_command.otp.otp_invalid The Yubikey code was invalid. Please try again. - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.verify_yubikey_command.otp.verification_error The Yubikey code could not be verified due to unknown reasons. - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.vetting.button.cancel_procedure @@ -1196,25 +1186,10 @@ Verify identity /../src/Surfnet/StepupRa/RaBundle/Resources/views/Vetting/partial/progressBar.html.twig - - ra.vetting.second_factor_type_disabled.text.explanation.sms - The token type SMS is currently disabled. Please contact your helpdesk to correct this problem. - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig - - - ra.vetting.second_factor_type_disabled.text.explanation.tiqr - The token type Tiqr is currently disabled. Please contact your helpdesk to correct this problem. - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig - - - ra.vetting.second_factor_type_disabled.text.explanation.u2f - The token type U2F is currently disabled. Please contact your helpdesk to correct this problem. - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig - - - ra.vetting.second_factor_type_disabled.text.explanation.yubikey - The token type Yubikey is currently disabled. Please contact your helpdesk to correct this problem. - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig + + ra.vetting.second_factor_type_disabled.text.explanation + Tokens of type %token_name% cannot be vetted. This token type has been disabled. + /../src/Surfnet/StepupRa/RaBundle/Resources/views/Vetting/secondFactorTypeDisabled.html.twig ra.vetting.second_factor_type_disabled.title @@ -1274,12 +1249,12 @@ ra.vetting.u2f.alert.device_reported_an_error The U2F device reported an error. Try again or visit your IT helpdesk. - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.vetting.u2f.alert.error The authentication using the U2F device failed. Try again or visit your IT helpdesk. - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.vetting.u2f.button.authenticate diff --git a/app/Resources/translations/messages.nl_NL.xliff b/app/Resources/translations/messages.nl_NL.xliff index a6248d87..e47c0246 100644 --- a/app/Resources/translations/messages.nl_NL.xliff +++ b/app/Resources/translations/messages.nl_NL.xliff @@ -1,6 +1,6 @@ - +
The source node in most cases contains the sample message as written by the developer. If it looks like a dot-delimitted string such as "form.label.firstname", then the developer has not provided a default message. @@ -35,72 +35,72 @@ ra.auditlog.action.accredited_as_ra Geaccrediteerd als RA - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.auditlog.action.accredited_as_raa Geaccrediteerd als RAA - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.auditlog.action.appointed_as_ra RA rol toegewezen gekregen - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.auditlog.action.appointed_as_raa RAA rol toegewezen gekregen - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.auditlog.action.bootstrapped Identiteit en Token gebootstrapped - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.auditlog.action.created Identiteit aangemaakt - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.auditlog.action.email_changed E-mail gewijzigd - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.auditlog.action.email_verified E-mail geverifieerd - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.auditlog.action.possession_proven Bezit aangetoond - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.auditlog.action.renamed Naam gewijzigd - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.auditlog.action.retracted_as_ra Verwijderd als RA(A) - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.auditlog.action.revoked Token verwijderd - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.auditlog.action.revoked_by_ra Token verwijderd door RA - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.auditlog.action.vetted Token gevet - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.auditlog.actor @@ -287,12 +287,12 @@ ra.form.extension.ra_role_choice.ra RA - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.form.extension.ra_role_choice.raa RAA - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.form.ra_create_ra_location.label.cancel @@ -338,72 +338,67 @@ ra.form.ra_search_ra_second_factors.button.export Exporteren - /../src/Surfnet/StepupRa/RaBundle/Form/Type/SearchRaSecondFactorsType.php + /../src/Surfnet/StepupRa/RaBundle/Form/Type/SearchRaSecondFactorsType.php ra.form.ra_search_ra_second_factors.button.search Zoek - /../src/Surfnet/StepupRa/RaBundle/Form/Type/SearchRaSecondFactorsType.php + /../src/Surfnet/StepupRa/RaBundle/Form/Type/SearchRaSecondFactorsType.php ra.form.ra_search_ra_second_factors.choice.status.revoked Verwijderd - /../src/Surfnet/StepupRa/RaBundle/Form/Type/SearchRaSecondFactorsType.php + /../src/Surfnet/StepupRa/RaBundle/Form/Type/SearchRaSecondFactorsType.php ra.form.ra_search_ra_second_factors.choice.status.unverified Niet geverifieerd - /../src/Surfnet/StepupRa/RaBundle/Form/Type/SearchRaSecondFactorsType.php + /../src/Surfnet/StepupRa/RaBundle/Form/Type/SearchRaSecondFactorsType.php ra.form.ra_search_ra_second_factors.choice.status.verified Geverifieerd - /../src/Surfnet/StepupRa/RaBundle/Form/Type/SearchRaSecondFactorsType.php + /../src/Surfnet/StepupRa/RaBundle/Form/Type/SearchRaSecondFactorsType.php ra.form.ra_search_ra_second_factors.choice.status.vetted Geactiveerd - /../src/Surfnet/StepupRa/RaBundle/Form/Type/SearchRaSecondFactorsType.php + /../src/Surfnet/StepupRa/RaBundle/Form/Type/SearchRaSecondFactorsType.php ra.form.ra_search_ra_second_factors.choice.type.sms SMS - /../src/Surfnet/StepupRa/RaBundle/Form/Type/SearchRaSecondFactorsType.php - - - ra.form.ra_search_ra_second_factors.choice.type.tiqr - Tiqr - /../src/Surfnet/StepupRa/RaBundle/Form/Type/SearchRaSecondFactorsType.php + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.form.ra_search_ra_second_factors.choice.type.yubikey Yubikey - /../src/Surfnet/StepupRa/RaBundle/Form/Type/SearchRaSecondFactorsType.php + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.form.ra_search_ra_second_factors.label.email E-mail - /../src/Surfnet/StepupRa/RaBundle/Form/Type/SearchRaSecondFactorsType.php + /../src/Surfnet/StepupRa/RaBundle/Form/Type/SearchRaSecondFactorsType.php ra.form.ra_search_ra_second_factors.label.name Naam - /../src/Surfnet/StepupRa/RaBundle/Form/Type/SearchRaSecondFactorsType.php + /../src/Surfnet/StepupRa/RaBundle/Form/Type/SearchRaSecondFactorsType.php ra.form.ra_search_ra_second_factors.label.second_factor_id Token-ID - /../src/Surfnet/StepupRa/RaBundle/Form/Type/SearchRaSecondFactorsType.php + /../src/Surfnet/StepupRa/RaBundle/Form/Type/SearchRaSecondFactorsType.php ra.form.ra_search_ra_second_factors.label.status Status - /../src/Surfnet/StepupRa/RaBundle/Form/Type/SearchRaSecondFactorsType.php + /../src/Surfnet/StepupRa/RaBundle/Form/Type/SearchRaSecondFactorsType.php ra.form.ra_search_ra_second_factors.label.type Type - /../src/Surfnet/StepupRa/RaBundle/Form/Type/SearchRaSecondFactorsType.php + /../src/Surfnet/StepupRa/RaBundle/Form/Type/SearchRaSecondFactorsType.php ra.form.ra_select_institution.button.select_and_apply @@ -484,7 +479,7 @@ ra.management.amend_ra_info.error.middleware_command_failed Het wijzigen van de gegevens van de RA is mislukt vanwege een serverfout. - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.management.amend_ra_info.info_amended @@ -572,7 +567,7 @@ ra.management.create_ra.error.middleware_command_failed De gekozen rol kon niet aan de identiteit toegekend worden vanwege een serverfout. - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.management.create_ra.identity_accredited @@ -748,17 +743,17 @@ ra.management.overview.role.value.ra RA - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.management.overview.role.value.raa RAA - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.management.overview.role.value.sraa SRAA - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.management.overview.update_information @@ -838,22 +833,22 @@ ra.prove_phone_possession.challenge_expired Uw code is verlopen. Vraag een nieuwe code aan. - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.prove_phone_possession.challenge_response_incorrect Deze code is niet juist. Probeer het nog eens, of vraag een nieuwe code op. - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.prove_phone_possession.too_many_attempts U heeft de limiet van tien pogingen bereikt; u kunt geen codes meer verifiëren. Neem contact op met uw helpdesk of probeer het later nog eens. - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.prove_yubikey_possession.different_yubikey_used Tijdens het registratieproces heeft de gebruiker een andere Yubikey gebruikt. - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.ra_location.change.title @@ -1045,22 +1040,22 @@ ra.second_factor.search.status.revoked Verwijderd - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.second_factor.search.status.unverified Niet geverifieerd - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.second_factor.search.status.verified Geverifieerd - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.second_factor.search.status.vetted Geactiveerd - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.second_factor.search.text.no_second_factors @@ -1080,22 +1075,17 @@ ra.second_factor.search.type.sms SMS - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig - - - ra.second_factor.search.type.tiqr - Tiqr - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.second_factor.search.type.u2f U2F - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.second_factor.search.type.yubikey Yubikey - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.secondfactor.auditlog @@ -1125,7 +1115,7 @@ ra.sms_send_challenge.send_sms_challenge_failed Het versturen van de SMS-code is mislukt. - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.sraa.changed_institution @@ -1152,12 +1142,12 @@ ra.verify_yubikey_command.otp.otp_invalid De Yubikey code is ongeldig. Probeer het nog eens - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.verify_yubikey_command.otp.verification_error De Yubikey-code kon om onbekende redenen niet geverifieerd worden. - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.vetting.button.cancel_procedure @@ -1196,25 +1186,10 @@ Identiteit controleren /../src/Surfnet/StepupRa/RaBundle/Resources/views/Vetting/partial/progressBar.html.twig - - ra.vetting.second_factor_type_disabled.text.explanation.sms - Het tokentype SMS is uitgeschakeld. Neem contact op met de helpdesk om dit probleem te verhelpen. - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig - - - ra.vetting.second_factor_type_disabled.text.explanation.tiqr - Het tokentype Tiqr is uitgeschakeld. Neem contact op met de helpdesk om dit probleem te verhelpen. - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig - - - ra.vetting.second_factor_type_disabled.text.explanation.u2f - Het tokentype U2F is uitgeschakeld. Neem contact op met de helpdesk om dit probleem te verhelpen. - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig - - - ra.vetting.second_factor_type_disabled.text.explanation.yubikey - Het tokentype Yubikey is uitgeschakeld. Neem contact op met de helpdesk om dit probleem te verhelpen. - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig + + ra.vetting.second_factor_type_disabled.text.explanation + Tokens van het type %token_name% kunnen niet geactiveerd worden. Dit tokentype is uitgeschakeld. + /../src/Surfnet/StepupRa/RaBundle/Resources/views/Vetting/secondFactorTypeDisabled.html.twig ra.vetting.second_factor_type_disabled.title @@ -1274,12 +1249,12 @@ ra.vetting.u2f.alert.device_reported_an_error Het U2F-apparaat heeft een foutmelding gerapporteerd. Probeer het opnieuw of neem contact op met de IT-helpdesk. - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.vetting.u2f.alert.error De authenticate met het U2F-apparaat is mislukt. Probeer het opnieuw of neem contact op met de IT-helpdesk. - /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig + /../src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig ra.vetting.u2f.button.authenticate diff --git a/app/Resources/translations/validators.en_GB.xliff b/app/Resources/translations/validators.en_GB.xliff index e01a0ec1..d8bcd53e 100644 --- a/app/Resources/translations/validators.en_GB.xliff +++ b/app/Resources/translations/validators.en_GB.xliff @@ -1,6 +1,6 @@ - +
The source node in most cases contains the sample message as written by the developer. If it looks like a dot-delimitted string such as "form.label.firstname", then the developer has not provided a default message. @@ -18,6 +18,10 @@ middleware_client.dto.configuration.use_ra_locations.must_be_boolean Use RA locations option must be boolean. + + middleware_client.dto.configuration.verify_email.must_be_boolean + middleware_client.dto.configuration.verify_email.must_be_boolean + middleware_client.dto.identity.common_name.must_be_string Remote identity common name must be a string. @@ -418,10 +422,6 @@ ra.search_ra_second_factors.status.invalid_choice Cannot filter by given status. - - ra.search_ra_second_factors.type.invalid_choice - Cannot filter by given token type. - ra.start_vetting_procedure.registration_code.may_not_be_empty Please enter the registration code the user has received by e-mail diff --git a/app/Resources/translations/validators.nl_NL.xliff b/app/Resources/translations/validators.nl_NL.xliff index 6837969f..45c47725 100644 --- a/app/Resources/translations/validators.nl_NL.xliff +++ b/app/Resources/translations/validators.nl_NL.xliff @@ -1,6 +1,6 @@ - +
The source node in most cases contains the sample message as written by the developer. If it looks like a dot-delimitted string such as "form.label.firstname", then the developer has not provided a default message. @@ -19,6 +19,10 @@ Use RA locations option must be boolean. + + middleware_client.dto.configuration.verify_email.must_be_boolean + middleware_client.dto.configuration.verify_email.must_be_boolean + middleware_client.dto.identity.common_name.must_be_string Remote identity common name must be a string. @@ -419,10 +423,6 @@ ra.search_ra_second_factors.status.invalid_choice Kan niet filteren op de opgegeven status. - - ra.search_ra_second_factors.type.invalid_choice - Kan niet filteren op het opgegeven tokentype. - ra.start_vetting_procedure.registration_code.may_not_be_empty Typ hier de registratiecode die de gebruiker per e-mail heeft ontvangen. diff --git a/app/config/samlstepupproviders.yml b/app/config/samlstepupproviders.yml index 615857dc..25befcaa 100644 --- a/app/config/samlstepupproviders.yml +++ b/app/config/samlstepupproviders.yml @@ -19,6 +19,7 @@ surfnet_stepup_ra_saml_stepup_provider: sso_url: %gssp_tiqr_remote_sso_url% certificate: %gssp_tiqr_remote_certificate% view_config: + title: %gssp_tiqr_title% page_title: %gssp_tiqr_page_title% explanation: %gssp_tiqr_explanation% initiate: %gssp_tiqr_initiate% @@ -36,6 +37,7 @@ surfnet_stepup_ra_saml_stepup_provider: sso_url: %gssp_biometric_remote_sso_url% certificate: %gssp_biometric_remote_certificate% view_config: + title: %gssp_biometric_title% page_title: %gssp_biometric_page_title% explanation: %gssp_biometric_explanation% initiate: %gssp_biometric_initiate% diff --git a/app/config/samlstepupproviders_parameters.yml.dist b/app/config/samlstepupproviders_parameters.yml.dist index bcddceb2..52751ff1 100644 --- a/app/config/samlstepupproviders_parameters.yml.dist +++ b/app/config/samlstepupproviders_parameters.yml.dist @@ -6,6 +6,9 @@ parameters: gssp_tiqr_remote_entity_id: 'https://actual-gssp.entity-id.tld' gssp_tiqr_remote_sso_url: 'https://actual-gssp.entity-id.tld/single-sign-on/url' gssp_tiqr_remote_certificate: 'The contents of the certificate published by the gssp' + gssp_tiqr_title: + en_GB: 'Tiqr' + nl_NL: 'Tiqr' gssp_tiqr_page_title: en_GB: 'EN ra.vetting.gssf.initiate.tiqr.title.page' nl_NL: 'NL ra.vetting.gssf.initiate.tiqr.title.page' @@ -25,6 +28,9 @@ parameters: gssp_biometric_remote_entity_id: 'https://actual-gssp.entity-id.tld' gssp_biometric_remote_sso_url: 'https://actual-gssp.entity-id.tld/single-sign-on/url' gssp_biometric_remote_certificate: 'The contents of the certificate published by the gssp' + gssp_biometric_title: + en_GB: 'Biometric' + nl_NL: 'Biometrisch' gssp_biometric_page_title: en_GB: 'EN ra.vetting.gssf.initiate.biometric.title.page' nl_NL: 'NL ra.vetting.gssf.initiate.biometric.title.page' diff --git a/composer.json b/composer.json index 2af5d8c8..0e15d36b 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,7 @@ "jms/translation-bundle": "~1.3.0", "jms/di-extra-bundle": "~1.4.0", "surfnet/stepup-middleware-client-bundle": "^2.0", - "surfnet/stepup-bundle": "^3.0", + "surfnet/stepup-bundle": "^3.2", "surfnet/stepup-u2f-bundle": "dev-develop", "guzzlehttp/guzzle": "^6", "knplabs/knp-paginator-bundle": "~2.4", diff --git a/composer.lock b/composer.lock index 55098b15..2762c629 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "content-hash": "d539a0fc966484aa4d5c257d4bd97a26", + "content-hash": "6430f5ef57cda9f51ebef7dd3658aeef", "packages": [ { "name": "beberlei/assert", @@ -2210,16 +2210,16 @@ }, { "name": "surfnet/stepup-bundle", - "version": "3.0.0", + "version": "3.2.0", "source": { "type": "git", "url": "https://github.com/OpenConext/Stepup-bundle.git", - "reference": "4564d2b468a9a9a0bcfa6356e055aacbd3c4e4f0" + "reference": "547c5bcb8fe1841fa657bbf43c5ea4b8e575ec3a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/OpenConext/Stepup-bundle/zipball/4564d2b468a9a9a0bcfa6356e055aacbd3c4e4f0", - "reference": "4564d2b468a9a9a0bcfa6356e055aacbd3c4e4f0", + "url": "https://api.github.com/repos/OpenConext/Stepup-bundle/zipball/547c5bcb8fe1841fa657bbf43c5ea4b8e575ec3a", + "reference": "547c5bcb8fe1841fa657bbf43c5ea4b8e575ec3a", "shasum": "" }, "require": { @@ -2263,7 +2263,7 @@ "suaas", "surfnet" ], - "time": "2017-11-30T07:47:43+00:00" + "time": "2018-03-14T13:11:17+00:00" }, { "name": "surfnet/stepup-middleware-client-bundle", diff --git a/src/Surfnet/StepupRa/RaBundle/Command/ExportRaSecondFactorsCommand.php b/src/Surfnet/StepupRa/RaBundle/Command/ExportRaSecondFactorsCommand.php index 08e3a346..ba8d4f14 100644 --- a/src/Surfnet/StepupRa/RaBundle/Command/ExportRaSecondFactorsCommand.php +++ b/src/Surfnet/StepupRa/RaBundle/Command/ExportRaSecondFactorsCommand.php @@ -41,8 +41,6 @@ final class ExportRaSecondFactorsCommand public $name; /** - * @Assert\Choice({"sms", "yubikey", "tiqr"}, message="ra.search_ra_second_factors.type.invalid_choice") - * * @var string|null */ public $type; diff --git a/src/Surfnet/StepupRa/RaBundle/Command/SearchRaSecondFactorsCommand.php b/src/Surfnet/StepupRa/RaBundle/Command/SearchRaSecondFactorsCommand.php index d76566f3..664271f7 100644 --- a/src/Surfnet/StepupRa/RaBundle/Command/SearchRaSecondFactorsCommand.php +++ b/src/Surfnet/StepupRa/RaBundle/Command/SearchRaSecondFactorsCommand.php @@ -41,8 +41,6 @@ final class SearchRaSecondFactorsCommand public $name; /** - * @Assert\Choice({"sms", "yubikey", "tiqr"}, message="ra.search_ra_second_factors.type.invalid_choice") - * * @var string|null */ public $type; diff --git a/src/Surfnet/StepupRa/RaBundle/Controller/Vetting/GssfController.php b/src/Surfnet/StepupRa/RaBundle/Controller/Vetting/GssfController.php index c3203f69..d781549b 100644 --- a/src/Surfnet/StepupRa/RaBundle/Controller/Vetting/GssfController.php +++ b/src/Surfnet/StepupRa/RaBundle/Controller/Vetting/GssfController.php @@ -254,8 +254,8 @@ private function getVettingService() */ private function renderInitiateForm($procedureId, $provider, array $parameters = []) { - /** @var ViewConfig $secondFactorConfig */ - $secondFactorConfig = $this->get("gssp.view_config.{$provider}"); + $collection = $this->get("surfnet_stepup.provider.collection"); + $secondFactorConfig = $collection->getByIdentifier($provider); $form = $this->createForm( 'ra_initiate_gssf', diff --git a/src/Surfnet/StepupRa/RaBundle/Form/Extension/SecondFactorTypeChoiceList.php b/src/Surfnet/StepupRa/RaBundle/Form/Extension/SecondFactorTypeChoiceList.php new file mode 100644 index 00000000..14820a06 --- /dev/null +++ b/src/Surfnet/StepupRa/RaBundle/Form/Extension/SecondFactorTypeChoiceList.php @@ -0,0 +1,104 @@ + 'SMS', + * 'yubi' => 'Yubikey', + * 'tiqr' => 'Tiqr' + * ] + * + * A message is logged when the second factor type id cannot be translated. Second factor type id's that cannot be + * translated, are not added to the choice list. + */ +class SecondFactorTypeChoiceList +{ + /** + * @var SecondFactorTypeService + */ + private $secondFactorTypeService; + + /** + * @var SecondFactorTypeTranslationService + */ + private $translator; + + /** + * @var LoggerInterface + */ + private $logger; + + /** + * @param SecondFactorTypeService $service + * @param SecondFactorTypeTranslationService $translator + */ + public function __construct( + SecondFactorTypeService $service, + SecondFactorTypeTranslationService $translator, + LoggerInterface $logger + ) { + $this->secondFactorTypeService = $service; + $this->translator = $translator; + $this->logger = $logger; + } + + /** + * @return array + */ + public function create() + { + $selectOptions = []; + $collection = $this->secondFactorTypeService->getAvailableSecondFactorTypes(); + + sort($collection); + + foreach ($collection as $sfTypeIdentifier) { + + $translation = $this->translator->translate( + $sfTypeIdentifier, + 'ra.form.ra_search_ra_second_factors.choice.type.%s' + ); + + // Test if the translator was able to translate the second factor type + if ($sfTypeIdentifier === $translation) { + $this->logger->warning( + sprintf( + 'Unable to add a filter option on the second factor type select list for type: "%s"', + $sfTypeIdentifier + ) + ); + continue; + } + $selectOptions[$sfTypeIdentifier] = $translation; + } + + return $selectOptions; + } +} diff --git a/src/Surfnet/StepupRa/RaBundle/Form/Type/SearchRaSecondFactorsType.php b/src/Surfnet/StepupRa/RaBundle/Form/Type/SearchRaSecondFactorsType.php index 8441ce17..b8ea9e3e 100644 --- a/src/Surfnet/StepupRa/RaBundle/Form/Type/SearchRaSecondFactorsType.php +++ b/src/Surfnet/StepupRa/RaBundle/Form/Type/SearchRaSecondFactorsType.php @@ -18,12 +18,23 @@ namespace Surfnet\StepupRa\RaBundle\Form\Type; +use Surfnet\StepupRa\RaBundle\Form\Extension\SecondFactorTypeChoiceList; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\OptionsResolver\OptionsResolver; class SearchRaSecondFactorsType extends AbstractType { + /** + * @var SecondFactorTypeChoiceList + */ + private $secondFactorTypeChoiseList; + + public function __construct(SecondFactorTypeChoiceList $secondFactorTypeChoiceList) + { + $this->secondFactorTypeChoiseList = $secondFactorTypeChoiceList; + } + public function buildForm(FormBuilderInterface $builder, array $options) { $builder->add('name', null, [ @@ -31,11 +42,7 @@ public function buildForm(FormBuilderInterface $builder, array $options) ]); $builder->add('type', 'choice', [ 'label' => 'ra.form.ra_search_ra_second_factors.label.type', - 'choices' => [ - 'sms' => 'ra.form.ra_search_ra_second_factors.choice.type.sms', - 'yubikey' => 'ra.form.ra_search_ra_second_factors.choice.type.yubikey', - 'tiqr' => 'ra.form.ra_search_ra_second_factors.choice.type.tiqr', - ], + 'choices' => $this->secondFactorTypeChoiseList->create(), 'required' => false, ]); $builder->add('secondFactorId', null, [ diff --git a/src/Surfnet/StepupRa/RaBundle/Resources/config/services.yml b/src/Surfnet/StepupRa/RaBundle/Resources/config/services.yml index aaa9493d..4f51d834 100644 --- a/src/Surfnet/StepupRa/RaBundle/Resources/config/services.yml +++ b/src/Surfnet/StepupRa/RaBundle/Resources/config/services.yml @@ -48,6 +48,8 @@ services: ra.form.type.search_ra_second_factors: class: Surfnet\StepupRa\RaBundle\Form\Type\SearchRaSecondFactorsType + arguments: + - "@ra.form.extension.second_factor_type_choice_list" tags: [{ name: form.type, alias: ra_search_ra_second_factors }] ra.form.type.ra_revoke_second_factor: @@ -88,6 +90,13 @@ services: arguments: - "@surfnet_stepup_middleware_client.identity.service.institution_listing" + ra.form.extension.second_factor_type_choice_list: + class: Surfnet\StepupRa\RaBundle\Form\Extension\SecondFactorTypeChoiceList + arguments: + - "@surfnet_stepup.service.second_factor_type" + - "@surfnet_stepup.service.second_factor_type_translator" + - "@logger" + # Services ra.service.vetting: class: Surfnet\StepupRa\RaBundle\Service\VettingService @@ -268,3 +277,10 @@ services: class: Surfnet\StepupRa\RaBundle\Twig\InstitutionConfigurationOptions arguments: - "@security.token_storage" + + ra.twig.second_factor_type: + class: Surfnet\StepupRa\RaBundle\Twig\Extensions\Extension\SecondFactorType + arguments: + - "@surfnet_stepup.service.second_factor_type_translator" + tags: + - { name : twig.extension } diff --git a/src/Surfnet/StepupRa/RaBundle/Resources/views/SecondFactor/auditLog.html.twig b/src/Surfnet/StepupRa/RaBundle/Resources/views/SecondFactor/auditLog.html.twig index 238b0497..ceb14fc5 100644 --- a/src/Surfnet/StepupRa/RaBundle/Resources/views/SecondFactor/auditLog.html.twig +++ b/src/Surfnet/StepupRa/RaBundle/Resources/views/SecondFactor/auditLog.html.twig @@ -30,7 +30,7 @@ {% for logEntry in auditLog.elements %} {{ logEntry.secondFactorIdentifier }} - {{ logEntry.secondFactorType }} + {{ logEntry.secondFactorType|trans_second_factor_type }} {{ ('ra.auditlog.action.' ~ logEntry.action)|trans }} {{ logEntry.actorCommonName }} diff --git a/src/Surfnet/StepupRa/RaBundle/Resources/views/SecondFactor/search.html.twig b/src/Surfnet/StepupRa/RaBundle/Resources/views/SecondFactor/search.html.twig index 58b571cf..f0dcb968 100644 --- a/src/Surfnet/StepupRa/RaBundle/Resources/views/SecondFactor/search.html.twig +++ b/src/Surfnet/StepupRa/RaBundle/Resources/views/SecondFactor/search.html.twig @@ -30,7 +30,7 @@ {% for secondFactor in secondFactors.elements %} {{ secondFactor.secondFactorId }} - {{ ('ra.second_factor.search.type.'~secondFactor.type)|trans }} + {{ secondFactor.type|trans_second_factor_type }} {{ secondFactor.name }} {{ secondFactor.email }} {% if secondFactor.documentNumber is not empty %}{{ secondFactor.documentNumber}}{% else %}—{% endif %} diff --git a/src/Surfnet/StepupRa/RaBundle/Resources/views/Vetting/secondFactorTypeDisabled.html.twig b/src/Surfnet/StepupRa/RaBundle/Resources/views/Vetting/secondFactorTypeDisabled.html.twig index 16c98d6d..e154e3fc 100644 --- a/src/Surfnet/StepupRa/RaBundle/Resources/views/Vetting/secondFactorTypeDisabled.html.twig +++ b/src/Surfnet/StepupRa/RaBundle/Resources/views/Vetting/secondFactorTypeDisabled.html.twig @@ -7,7 +7,7 @@

{{ block('page_title') }}

-

{{ ('ra.vetting.second_factor_type_disabled.text.explanation.' ~ secondFactorType)|trans }}

+

{{ 'ra.vetting.second_factor_type_disabled.text.explanation'|trans({'%token_name%': secondFactorType|trans_second_factor_type}) }}

{% endblock %} diff --git a/src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig b/src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig index 6191101c..5a445353 100644 --- a/src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig +++ b/src/Surfnet/StepupRa/RaBundle/Resources/views/translations.html.twig @@ -9,12 +9,6 @@ {{ 'ra.verify_identity.identity_verification_failed'|trans }} {{ 'ra.verify_identity.registration_code_expired'|trans }} -{# VettingController secondFactorTypeDisabled #} -{{ 'ra.vetting.second_factor_type_disabled.text.explanation.sms'|trans }} -{{ 'ra.vetting.second_factor_type_disabled.text.explanation.yubikey'|trans }} -{{ 'ra.vetting.second_factor_type_disabled.text.explanation.tiqr'|trans }} -{{ 'ra.vetting.second_factor_type_disabled.text.explanation.u2f'|trans }} - {# Prove Yubikey form #} {{ 'ra.verify_yubikey_command.otp.otp_invalid'|trans }} {{ 'ra.verify_yubikey_command.otp.verification_error'|trans }} @@ -29,7 +23,6 @@ {# SecondFactorController#search #} {{ 'ra.second_factor.search.type.sms'|trans }} {{ 'ra.second_factor.search.type.yubikey'|trans }} -{{ 'ra.second_factor.search.type.tiqr'|trans }} {{ 'ra.second_factor.search.type.u2f'|trans }} {{ 'ra.second_factor.search.status.unverified'|trans }} {{ 'ra.second_factor.search.status.verified'|trans }} @@ -66,3 +59,7 @@ {# U2fController #} {{ 'ra.vetting.u2f.alert.device_reported_an_error'|trans }} {{ 'ra.vetting.u2f.alert.error'|trans }} + +{# Second factor type choise options #} +{{ 'ra.form.ra_search_ra_second_factors.choice.type.sms'|trans }} +{{ 'ra.form.ra_search_ra_second_factors.choice.type.yubikey'|trans }} \ No newline at end of file diff --git a/src/Surfnet/StepupRa/RaBundle/Twig/Extensions/Extension/SecondFactorType.php b/src/Surfnet/StepupRa/RaBundle/Twig/Extensions/Extension/SecondFactorType.php new file mode 100644 index 00000000..5b0711fd --- /dev/null +++ b/src/Surfnet/StepupRa/RaBundle/Twig/Extensions/Extension/SecondFactorType.php @@ -0,0 +1,53 @@ +translator = $translator; + } + + public function getName() + { + return 'ra.twig.second_factor_type'; + } + + public function getFilters() + { + return [ + new Twig_SimpleFilter('trans_second_factor_type', [$this, 'translateSecondFactorType']), + ]; + } + + public function translateSecondFactorType($secondFactorType) + { + return $this->translator->translate($secondFactorType, 'ra.second_factor.search.type.%s'); + } +} diff --git a/src/Surfnet/StepupRa/SamlStepupProviderBundle/DependencyInjection/Compiler/ViewConfigCollectionPass.php b/src/Surfnet/StepupRa/SamlStepupProviderBundle/DependencyInjection/Compiler/ViewConfigCollectionPass.php new file mode 100644 index 00000000..213f1805 --- /dev/null +++ b/src/Surfnet/StepupRa/SamlStepupProviderBundle/DependencyInjection/Compiler/ViewConfigCollectionPass.php @@ -0,0 +1,53 @@ +has('surfnet_stepup.provider.collection')) { + return; + } + + $definition = $container->findDefinition('surfnet_stepup.provider.collection'); + $taggedServices = $container->findTaggedServiceIds( + SurfnetStepupRaSamlStepupProviderExtension::VIEW_CONFIG_TAG_NAME + ); + + $taggedServices = array_keys($taggedServices); + + foreach ($taggedServices as $id) { + preg_match('/^gssp\.view_config\.(\w+)$/', $id, $gsspIdMatches); + if (!is_array($gsspIdMatches)) { + throw new InvalidConfigurationException('A manually tagged view config service was named incorrectly.'); + } + $definition->addMethodCall('addViewConfig', [new Reference($id), end($gsspIdMatches)]); + } + } +} diff --git a/src/Surfnet/StepupRa/SamlStepupProviderBundle/DependencyInjection/Configuration.php b/src/Surfnet/StepupRa/SamlStepupProviderBundle/DependencyInjection/Configuration.php index f44dbe8a..b31f8214 100644 --- a/src/Surfnet/StepupRa/SamlStepupProviderBundle/DependencyInjection/Configuration.php +++ b/src/Surfnet/StepupRa/SamlStepupProviderBundle/DependencyInjection/Configuration.php @@ -134,6 +134,18 @@ private function addProvidersSection(ArrayNodeDefinition $rootNode) ->end() ->arrayNode('view_config') ->children() + ->arrayNode('title') + ->children() + ->scalarNode('en_GB') + ->isRequired() + ->info('English gssp title translation') + ->end() + ->scalarNode('nl_NL') + ->isRequired() + ->info('Dutch gssp title translation') + ->end() + ->end() + ->end() ->arrayNode('page_title') ->children() ->scalarNode('en_GB') diff --git a/src/Surfnet/StepupRa/SamlStepupProviderBundle/DependencyInjection/SurfnetStepupRaSamlStepupProviderExtension.php b/src/Surfnet/StepupRa/SamlStepupProviderBundle/DependencyInjection/SurfnetStepupRaSamlStepupProviderExtension.php index d22b75e3..e09ff840 100644 --- a/src/Surfnet/StepupRa/SamlStepupProviderBundle/DependencyInjection/SurfnetStepupRaSamlStepupProviderExtension.php +++ b/src/Surfnet/StepupRa/SamlStepupProviderBundle/DependencyInjection/SurfnetStepupRaSamlStepupProviderExtension.php @@ -28,6 +28,9 @@ class SurfnetStepupRaSamlStepupProviderExtension extends Extension { + + const VIEW_CONFIG_TAG_NAME = 'gssp.view_config'; + /** * {@inheritdoc} */ @@ -81,13 +84,15 @@ private function loadProviderConfiguration( $container->setDefinition('gssp.provider.' . $provider, $providerDefinition); $viewConfigDefinition = new Definition('Surfnet\StepupRa\SamlStepupProviderBundle\Provider\ViewConfig', [ - new Reference('request'), + new Reference('request_stack'), + $configuration['view_config']['title'], $configuration['view_config']['page_title'], $configuration['view_config']['explanation'], $configuration['view_config']['initiate'], $configuration['view_config']['gssf_id_mismatch'], ]); - $viewConfigDefinition->setScope('request'); + $viewConfigDefinition->setPublic(false); + $viewConfigDefinition->addTag(self::VIEW_CONFIG_TAG_NAME); $container->setDefinition('gssp.view_config.' . $provider, $viewConfigDefinition); diff --git a/src/Surfnet/StepupRa/SamlStepupProviderBundle/Provider/ViewConfig.php b/src/Surfnet/StepupRa/SamlStepupProviderBundle/Provider/ViewConfig.php index d8b96f40..0a5fbbf7 100644 --- a/src/Surfnet/StepupRa/SamlStepupProviderBundle/Provider/ViewConfig.php +++ b/src/Surfnet/StepupRa/SamlStepupProviderBundle/Provider/ViewConfig.php @@ -18,11 +18,16 @@ namespace Surfnet\StepupRa\SamlStepupProviderBundle\Provider; +use Surfnet\StepupBundle\Value\Provider\ViewConfigInterface; use Surfnet\StepupRa\RaBundle\Exception\LogicException; -use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\RequestStack; -class ViewConfig +class ViewConfig implements ViewConfigInterface { + /** + * @var array + */ + public $title; /** * @var array @@ -45,14 +50,15 @@ class ViewConfig public $gssfIdMismatch; /** - * @var Request + * @var RequestStack */ - private $request; + private $requestStack; /** * The arrays are arrays of translated text, indexed on locale. * - * @param Request $request + * @param RequestStack $requestStack + * @param array $title * @param array $pageTitle * @param array $explanation * @param array $initiate @@ -60,19 +66,29 @@ class ViewConfig * @SuppressWarnings(PHPMD.ExcessiveParameterList) */ public function __construct( - Request $request, + RequestStack $requestStack, + array $title, array $pageTitle, array $explanation, array $initiate, array $gssfIdMismatch ) { - $this->request = $request; + $this->requestStack = $requestStack; + $this->title = $title; $this->pageTitle = $pageTitle; $this->explanation = $explanation; $this->initiate = $initiate; $this->gssfIdMismatch = $gssfIdMismatch; } + /** + * @return array + */ + public function getTitle() + { + return $this->getTranslation($this->title); + } + /** * @return array */ @@ -112,7 +128,7 @@ public function getPageTitle() */ private function getTranslation(array $translations) { - $currentLocale = $this->request->getLocale(); + $currentLocale = $this->requestStack->getCurrentRequest()->getLocale(); if (is_null($currentLocale)) { throw new LogicException('The current language is not set'); } diff --git a/src/Surfnet/StepupRa/SamlStepupProviderBundle/SurfnetStepupRaSamlStepupProviderBundle.php b/src/Surfnet/StepupRa/SamlStepupProviderBundle/SurfnetStepupRaSamlStepupProviderBundle.php index f25d677d..04189bda 100644 --- a/src/Surfnet/StepupRa/SamlStepupProviderBundle/SurfnetStepupRaSamlStepupProviderBundle.php +++ b/src/Surfnet/StepupRa/SamlStepupProviderBundle/SurfnetStepupRaSamlStepupProviderBundle.php @@ -19,6 +19,7 @@ namespace Surfnet\StepupRa\SamlStepupProviderBundle; use Surfnet\StepupRa\SamlStepupProviderBundle\DependencyInjection\Compiler\StateHandlerSessionPass; +use Surfnet\StepupRa\SamlStepupProviderBundle\DependencyInjection\Compiler\ViewConfigCollectionPass; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\HttpKernel\Bundle\Bundle; @@ -27,5 +28,6 @@ class SurfnetStepupRaSamlStepupProviderBundle extends Bundle public function build(ContainerBuilder $container) { $container->addCompilerPass(new StateHandlerSessionPass()); + $container->addCompilerPass(new ViewConfigCollectionPass()); } } diff --git a/src/Surfnet/StepupRa/SamlStepupProviderBundle/Tests/Provider/ViewConfigTest.php b/src/Surfnet/StepupRa/SamlStepupProviderBundle/Tests/Provider/ViewConfigTest.php index a19e4abd..edb31233 100644 --- a/src/Surfnet/StepupRa/SamlStepupProviderBundle/Tests/Provider/ViewConfigTest.php +++ b/src/Surfnet/StepupRa/SamlStepupProviderBundle/Tests/Provider/ViewConfigTest.php @@ -22,6 +22,7 @@ use PHPUnit_Framework_TestCase as TestCase; use Surfnet\StepupRa\SamlStepupProviderBundle\Provider\ViewConfig; use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\RequestStack; /** * Tests the ViewConfig class @@ -37,12 +38,14 @@ public function view_config_translates_correctly() { $viewConfig = $this->buildViewConfig('nl_NL'); + $this->assertEquals('NL title', $viewConfig->getTitle()); $this->assertEquals('NL pageTitle', $viewConfig->getPageTitle()); $this->assertEquals('NL explanation', $viewConfig->getExplanation()); $this->assertEquals('NL initiate', $viewConfig->getInitiate()); $this->assertEquals('NL gssfIdMismatch', $viewConfig->getGssfIdMismatch()); $viewConfig = $this->buildViewConfig('en_GB'); + $this->assertEquals('EN title', $viewConfig->getTitle()); $this->assertEquals('EN pageTitle', $viewConfig->getPageTitle()); $this->assertEquals('EN explanation', $viewConfig->getExplanation()); $this->assertEquals('EN initiate', $viewConfig->getInitiate()); @@ -80,10 +83,11 @@ public function view_config_cannot_serve_french_translations() */ private function buildViewConfig($locale = '') { - $request = m::mock(Request::class); - $request->shouldReceive('getLocale')->andReturn($locale)->byDefault(); + $request = m::mock(RequestStack::class); + $request->shouldReceive('getCurrentRequest->getLocale')->andReturn($locale)->byDefault(); return new ViewConfig( $request, + $this->getTranslationsArray('title'), $this->getTranslationsArray('pageTitle'), $this->getTranslationsArray('explanation'), $this->getTranslationsArray('initiate'),