Skip to content

Commit

Permalink
- feat: added SAML2_CUSTOM_WAYF_TEMPLATE
Browse files Browse the repository at this point in the history
- feat: added SAML2_CUSTOM_AUTHORIZATION_ERROR_TEMPLATE
- feat: added SAML2_CUSTOM_POST_BINDING_FORM_TEMPLATE
  • Loading branch information
peppelinux committed Jul 15, 2021
1 parent bf54cc7 commit 7e2671b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
17 changes: 14 additions & 3 deletions djangosaml2/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,20 @@ class LoginView(SPConfigMixin, View):
will be rendered.
"""

wayf_template = getattr(settings,'SAML2_CUSTOM_WAYF_TEMPLATE','djangosaml2/wayf.html')
authorization_error_template = getattr(settings,'SAML2_CUSTOM_AUTHORIZATION_ERROR_TEMPLATE','djangosaml2/auth_error.html')
post_binding_form_template = getattr(settings,'SAML2_CUSTOM_POST_BINDING_FORM_TEMPLATE','djangosaml2/post_binding_form.html')
wayf_template = getattr(
settings,
'SAML2_CUSTOM_WAYF_TEMPLATE','djangosaml2/wayf.html'
)
authorization_error_template = getattr(
settings,
'SAML2_CUSTOM_AUTHORIZATION_ERROR_TEMPLATE',
'djangosaml2/auth_error.html'
)
post_binding_form_template = getattr(
settings,
'SAML2_CUSTOM_POST_BINDING_FORM_TEMPLATE',
'djangosaml2/post_binding_form.html'
)

def get_next_path(self, request: HttpRequest) -> str:
''' Returns the path to put in the RelayState to redirect the user to after having logged in.
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def read(*rnames):

setup(
name='djangosaml2',
version='1.3.2',
version='1.3.3',
description='pysaml2 integration for Django',
long_description=read('README.md'),
long_description_content_type='text/markdown',
Expand Down

0 comments on commit 7e2671b

Please sign in to comment.