From cea1050942eaa7856ce5ef4b740f766378accb24 Mon Sep 17 00:00:00 2001 From: David Pugh Date: Mon, 21 Dec 2020 00:28:44 +0000 Subject: [PATCH] Adding login_ui safe filter --- src/fastapi_aad_auth/ui/__init__.py | 1 + src/fastapi_aad_auth/ui/login.html | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/fastapi_aad_auth/ui/__init__.py b/src/fastapi_aad_auth/ui/__init__.py index 31afebc..dcb2ffe 100644 --- a/src/fastapi_aad_auth/ui/__init__.py +++ b/src/fastapi_aad_auth/ui/__init__.py @@ -59,6 +59,7 @@ def _login(self, request: Request, *args, **kwargs): if 'login' not in context or context['login'] is None: # type: ignore post_redirect = self._authenticator._session_validator.pop_post_auth_redirect(request) context['login'] = '
'.join([provider.get_login_button(post_redirect) for provider in self._authenticator._providers]) # type: ignore + self.logger.debug(f'Context {context}') return self.login_templates.TemplateResponse(self.login_template_path.name, context) # type: ignore def _get_user(self, request: Request, **kwargs): diff --git a/src/fastapi_aad_auth/ui/login.html b/src/fastapi_aad_auth/ui/login.html index d5c6d39..7e67eb5 100644 --- a/src/fastapi_aad_auth/ui/login.html +++ b/src/fastapi_aad_auth/ui/login.html @@ -20,13 +20,13 @@

Please sign in

{% endblock Login %} {% block ContentFooter %} {% if copyright %} -

© {{ copyright }}

+

© {{ copyright | safe }}

{% endif %} {% if explanation %} -

{{ explanation }}

+

{{ explanation | safe }}

{% endif %} {% endblock ContentFooter %} - +