diff --git a/modules/authX509/lib/Auth/Source/X509userCert.php b/modules/authX509/lib/Auth/Source/X509userCert.php index e92f0c38767d4b47e2c9e7687a1be93bb4bb7d1c..6e00188c7049b9f395e924f3c273b1ece18ed6a2 100644 --- a/modules/authX509/lib/Auth/Source/X509userCert.php +++ b/modules/authX509/lib/Auth/Source/X509userCert.php @@ -69,10 +69,13 @@ class sspmod_authX509_Auth_Source_X509userCert extends SimpleSAML_Auth_Source public function authFailed(&$state) { $config = SimpleSAML_Configuration::getInstance(); + $errorcodes = SimpleSAML\Error\ErrorCodes::getAllErrorCodeMessages(); $t = new SimpleSAML_XHTML_Template($config, 'authX509:X509error.php'); + $t->data['loginurl'] = SimpleSAML\Utils\HTTP::getSelfURL(); $t->data['errorcode'] = $state['authX509.error']; - + $t->data['errortitle'] = $errorcodes['title'][$state['authX509.error']]; + $t->data['errordescr'] = $errorcodes['descr'][$state['authX509.error']]; $t->show(); exit(); } diff --git a/modules/authX509/locales/da/LC_MESSAGES/authX509.po b/modules/authX509/locales/da/LC_MESSAGES/authX509.po index 6e89789b11eeaedc1e17999179cc8e33806d6b24..ac4d02a7b2e157d8b612418dae322ba0faa70545 100644 --- a/modules/authX509/locales/da/LC_MESSAGES/authX509.po +++ b/modules/authX509/locales/da/LC_MESSAGES/authX509.po @@ -40,14 +40,14 @@ msgid "Please renew your certificate in time." msgstr "Forny venligst dit certifikat i tide." #, python-format -msgid "Your certificate will expire in %days% days." -msgstr "Dit certifikat udløber om %days% dage." +msgid "Your certificate will expire in %daysleft% days." +msgstr "Dit certifikat udløber om %daysleft% dage." msgid "X509 certificate authentication" msgstr "X509 certifikat authentifikation" #, python-format -msgid "Please <a href='%renewurl%'>renew</a> your certificate in time." +msgid "Please <a href='%renewurl%'>renew your certificate</a> in time." msgstr "<a href='%renewurl%'>Forny</a>, venligst dit certifikat før det udløber." msgid "Proceed" diff --git a/modules/authX509/locales/el/LC_MESSAGES/authX509.po b/modules/authX509/locales/el/LC_MESSAGES/authX509.po index 26cf3a027cbe01bb0a24cf710dda4127e44e0083..1c11e6014c7362aa3e28a82fd14375802aaec59b 100644 --- a/modules/authX509/locales/el/LC_MESSAGES/authX509.po +++ b/modules/authX509/locales/el/LC_MESSAGES/authX509.po @@ -42,14 +42,14 @@ msgid "Please renew your certificate in time." msgstr "ΠαĎακαλείĎτε να Ď€ĎοχωĎήĎετε Ďε ανανÎωĎη του πιĎτοποιητικού Ďας ÎγκαιĎα." #, python-format -msgid "Your certificate will expire in %days% days." -msgstr "Η ÎąĎχύς του πιĎτοποιητικού Ďας θα λήξει Ďε %days%." +msgid "Your certificate will expire in %daysleft% days." +msgstr "Η ÎąĎχύς του πιĎτοποιητικού Ďας θα λήξει Ďε %daysleft%." msgid "X509 certificate authentication" msgstr "ΤαυτοποίηĎη ÎĽÎĎω πιĎτοποιητικού X.509" #, python-format -msgid "Please <a href='%renewurl%'>renew</a> your certificate in time." +msgid "Please <a href='%renewurl%'>renew your certificate</a> in time." msgstr "" "ΠαĎακαλείĎτε να Ď€ĎοχωĎήĎετε Ďε <a href=â€%renewurl%’>ανανÎωĎη</a> του " "πιĎτοποιητικού Ďας ÎγκαιĎα." diff --git a/modules/authX509/locales/en/LC_MESSAGES/authX509.po b/modules/authX509/locales/en/LC_MESSAGES/authX509.po index 6457d3edf9f73184fc4f7fa524fa0269a9badcde..5f67704c1cc78e4674617f5b3109f83f5844701e 100644 --- a/modules/authX509/locales/en/LC_MESSAGES/authX509.po +++ b/modules/authX509/locales/en/LC_MESSAGES/authX509.po @@ -40,15 +40,15 @@ msgid "Please renew your certificate in time." msgstr "Please renew your certificate in time." #, python-format -msgid "Your certificate will expire in %days% days." -msgstr "Your certificate will expire in %days% days." +msgid "Your certificate will expire in %daysleft% days." +msgstr "Your certificate will expire in %daysleft% days." msgid "X509 certificate authentication" msgstr "X509 certificate authentication" #, python-format -msgid "Please <a href='%renewurl%'>renew</a> your certificate in time." -msgstr "Please <a href='%renewurl%'>renew</a> your certificate in time." +msgid "Please <a href='%renewurl%'>renew your certificate</a> in time." +msgstr "Please <a href='%renewurl%'>renew your certificate</a> in time." msgid "Proceed" msgstr "Proceed" diff --git a/modules/authX509/locales/es/LC_MESSAGES/authX509.po b/modules/authX509/locales/es/LC_MESSAGES/authX509.po index 7256e926b8d3551b5a895d521743ba83bfc38b19..a398bade23fad1a9f932114ffece0e8aefeed33b 100644 --- a/modules/authX509/locales/es/LC_MESSAGES/authX509.po +++ b/modules/authX509/locales/es/LC_MESSAGES/authX509.po @@ -42,15 +42,15 @@ msgid "Please renew your certificate in time." msgstr "Por favor, renueve su certificado a tiempo." #, python-format -msgid "Your certificate will expire in %days% days." -msgstr "Su certificado caduca en %days% dĂas." +msgid "Your certificate will expire in %daysleft% days." +msgstr "Su certificado caduca en %daysleft% dĂas." msgid "X509 certificate authentication" msgstr "AutenticaciĂłn mediante certificado X509" #, python-format -msgid "Please <a href='%renewurl%'>renew</a> your certificate in time." -msgstr "Por favor, <a href=â€%renewurl%’>renueve</a> su certificado a tiempo." +msgid "Please <a href='%renewurl%'>renew your certificate</a> in time." +msgstr "Por favor, <a href=â€%renewurl%’>renueve su certificado</a> a tiempo." msgid "Proceed" msgstr "Continuar" diff --git a/modules/authX509/locales/nb/LC_MESSAGES/authX509.po b/modules/authX509/locales/nb/LC_MESSAGES/authX509.po index 1a74b995c595348f39769573f7e147771bda08e3..e6c708808e54bf4624060650ebb05ff25c094dd2 100644 --- a/modules/authX509/locales/nb/LC_MESSAGES/authX509.po +++ b/modules/authX509/locales/nb/LC_MESSAGES/authX509.po @@ -42,14 +42,14 @@ msgid "Please renew your certificate in time." msgstr "Vennligst forny sertifikatet ditt før det utløper." #, python-format -msgid "Your certificate will expire in %days% days." -msgstr "Sertifikatet ditt vil utløpe om %days% dager." +msgid "Your certificate will expire in %daysleft% days." +msgstr "Sertifikatet ditt vil utløpe om %daysleft% dager." msgid "X509 certificate authentication" msgstr "X509 sertifikatautentisering" #, python-format -msgid "Please <a href='%renewurl%'>renew</a> your certificate in time." +msgid "Please <a href='%renewurl%'>renew your certificate</a> in time." msgstr "" "Vennligst <a href=â€%renewurl%’>forny</a> sertifikatet ditt før det " "utløper." diff --git a/modules/authX509/locales/nl/LC_MESSAGES/authX509.po b/modules/authX509/locales/nl/LC_MESSAGES/authX509.po index 5e341db07117801add3c15160524396202c3e766..b7f5d3d96fd4a47576e827adc9863106d790cc08 100644 --- a/modules/authX509/locales/nl/LC_MESSAGES/authX509.po +++ b/modules/authX509/locales/nl/LC_MESSAGES/authX509.po @@ -42,15 +42,15 @@ msgid "Please renew your certificate in time." msgstr "Vervang tijdig je certificaat." #, python-format -msgid "Your certificate will expire in %days% days." -msgstr "Je certificaat verloopt over %days% dagen." +msgid "Your certificate will expire in %daysleft% days." +msgstr "Je certificaat verloopt over %daysleft% dagen." msgid "X509 certificate authentication" msgstr "Authenticatie via X509-certificaat" #, python-format -msgid "Please <a href='%renewurl%'>renew</a> your certificate in time." -msgstr "<a href='%renewurl%'>Vervang</a> tijdig je certificaat." +msgid "Please <a href=\"%renewurl%\">renew your certificate</a> in time." +msgstr "<a href=\"%renewurl%\">Vervang tijdig je certificaat</a>." msgid "Proceed" msgstr "Verder" diff --git a/modules/authX509/templates/X509error.twig b/modules/authX509/templates/X509error.twig new file mode 100644 index 0000000000000000000000000000000000000000..c350ea53f1692b86911f6b9fa5a9ea3da0f5257a --- /dev/null +++ b/modules/authX509/templates/X509error.twig @@ -0,0 +1,19 @@ +{% set pagetitle = 'X509 certificate authentication'|trans %} +{% extends "base.twig" %} +{% block content %} + +{% if errorcode -%} +<h2>{% trans 'Error' %}</h2> + <h3>{% trans errortitle %}</h3> + <p>{% trans errordescr %}</p> +{% endif -%} + +<h2>{% trans 'X509 certificate authentication' %}</h2> + +<p>{% trans 'X509 certificate authentication is required to access this service.' %}</p> + +<a href="{{ loginurl }}"> +{% trans 'Login' %} +</a> + +{% endblock %} diff --git a/modules/authX509/templates/X509warning.twig b/modules/authX509/templates/X509warning.twig new file mode 100644 index 0000000000000000000000000000000000000000..59a65f64f0f30f533aaaa64864fcc6d4047cfcaa --- /dev/null +++ b/modules/authX509/templates/X509warning.twig @@ -0,0 +1,26 @@ +{% set autofocus = 'proceedbutton' %} + +{% extends "base.twig" %} + +{% block content %} + +<h2>{% trans 'Your certificate is about to expire.' %}</h2> +<form action="{{ target | escape }}"> + + {% for name, value in data -%} + <input type="hidden" name="{{ name }}" value="{{ value }}" /> + {%- endfor %} + + <p>{% trans %}Your certificate will expire in {{ daysleft }} days.{% endtrans %}</p> + + {% if renewurl -%} + <p>{% trans %}Please <a href="{{ renewurl }}">renew your certificate</a> in time.{% endtrans %}</p> + {% else -%} + <p>{% trans 'Please renew your certificate in time.' %}</p> + {% endif -%} + + <p><input type="submit" name="proceed" id="proceedbutton" value="{% trans 'Proceed' %}" /></p> + +</form> + +{% endblock %}