Skip to content

Commit 7e2671b

Browse files
committed
- feat: added SAML2_CUSTOM_WAYF_TEMPLATE
- feat: added SAML2_CUSTOM_AUTHORIZATION_ERROR_TEMPLATE - feat: added SAML2_CUSTOM_POST_BINDING_FORM_TEMPLATE
1 parent bf54cc7 commit 7e2671b

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

djangosaml2/views.py

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,20 @@ class LoginView(SPConfigMixin, View):
110110
will be rendered.
111111
"""
112112

113-
wayf_template = getattr(settings,'SAML2_CUSTOM_WAYF_TEMPLATE','djangosaml2/wayf.html')
114-
authorization_error_template = getattr(settings,'SAML2_CUSTOM_AUTHORIZATION_ERROR_TEMPLATE','djangosaml2/auth_error.html')
115-
post_binding_form_template = getattr(settings,'SAML2_CUSTOM_POST_BINDING_FORM_TEMPLATE','djangosaml2/post_binding_form.html')
113+
wayf_template = getattr(
114+
settings,
115+
'SAML2_CUSTOM_WAYF_TEMPLATE','djangosaml2/wayf.html'
116+
)
117+
authorization_error_template = getattr(
118+
settings,
119+
'SAML2_CUSTOM_AUTHORIZATION_ERROR_TEMPLATE',
120+
'djangosaml2/auth_error.html'
121+
)
122+
post_binding_form_template = getattr(
123+
settings,
124+
'SAML2_CUSTOM_POST_BINDING_FORM_TEMPLATE',
125+
'djangosaml2/post_binding_form.html'
126+
)
116127

117128
def get_next_path(self, request: HttpRequest) -> str:
118129
''' Returns the path to put in the RelayState to redirect the user to after having logged in.

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def read(*rnames):
2424

2525
setup(
2626
name='djangosaml2',
27-
version='1.3.2',
27+
version='1.3.3',
2828
description='pysaml2 integration for Django',
2929
long_description=read('README.md'),
3030
long_description_content_type='text/markdown',

0 commit comments

Comments
 (0)