diff options
author | Roland Hedberg <roland.hedberg@adm.umu.se> | 2015-11-13 15:41:31 +0100 |
---|---|---|
committer | Roland Hedberg <roland.hedberg@adm.umu.se> | 2015-11-13 15:41:31 +0100 |
commit | 17c748f516d6abe5f9f39e3c69e523b8f8177195 (patch) | |
tree | 2b1e5de9f2664807edb44e849f549031c554294c /src/saml2/entity.py | |
parent | 373668e1d32d00822330183cad9e4f7a12d0b3fc (diff) | |
download | pysaml2-17c748f516d6abe5f9f39e3c69e523b8f8177195.tar.gz |
The IdP doing form_post or the SP doing post is two different things.
Diffstat (limited to 'src/saml2/entity.py')
-rw-r--r-- | src/saml2/entity.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/saml2/entity.py b/src/saml2/entity.py index 1d191f8a..84f31003 100644 --- a/src/saml2/entity.py +++ b/src/saml2/entity.py @@ -215,10 +215,16 @@ class Entity(HTTPBase): if binding == BINDING_HTTP_POST: logger.info("HTTP POST") - info = self.use_http_form_post(msg_str, destination, - relay_state, typ) - info["url"] = destination - info["method"] = "GET" + if self.entity_type == 'sp': + info = self.use_http_post(msg_str, destination, relay_state, + typ) + info["url"] = destination + info["method"] = "POST" + else: + info = self.use_http_form_post(msg_str, destination, + relay_state, typ) + info["url"] = destination + info["method"] = "GET" elif binding == BINDING_HTTP_REDIRECT: logger.info("HTTP REDIRECT") info = self.use_http_get(msg_str, destination, relay_state, typ, |