Skip to content

Commit

Permalink
Add example template for HTTP POST binding form
Browse files Browse the repository at this point in the history
  • Loading branch information
knaperek committed May 7, 2015
1 parent 388e5a6 commit 9c6fe40
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
15 changes: 15 additions & 0 deletions djangosaml2/templates/djangosaml2/example_post_binding_form.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<script type="text/javascript">
window.onload = function(){
document.SSO_Login.submit();
};
</script>
<p>
You're being redirected to a SSO login page.
Please click the button below if you're not redirected automatically within a few seconds.
</p>
<form method="post" action="{{ target_url }}" name="SSO_Login">
{% for key, value in params.items %}
<input type="hidden" name="{{ key|safe }}" value="{{ value|safe }}" />
{% endfor %}
<input type="submit" value="Log in" />
</form>
2 changes: 1 addition & 1 deletion djangosaml2/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def login(request,
binding is being used. You can customize this template to include custom
branding and/or text explaining the automatic redirection process. Please
see the example template in
templates/djangosaml2/example_post_binding_from.html
templates/djangosaml2/example_post_binding_form.html
If set to None or nonexistent template, default form from the saml2 library
will be rendered.
"""
Expand Down

0 comments on commit 9c6fe40

Please sign in to comment.