File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 3737 UnsolicitedResponse )
3838from saml2 .s_utils import UnsupportedBinding
3939from saml2 .sigver import MissingKey
40+ from saml2 .samlp import AuthnRequest
4041from saml2 .validate import ResponseLifetimeExceed , ToEarly
4142from saml2 .xmldsig import ( # support for SHA1 is required by spec
4243 SIG_RSA_SHA1 , SIG_RSA_SHA256 )
@@ -205,8 +206,10 @@ def login(request,
205206 binding = binding ,
206207 ** kwargs )
207208 try :
209+ if isinstance (request_xml , AuthnRequest ):
210+ # request_xml will be an instance of AuthnRequest if the message is not signed
211+ request_xml = str (request_xml )
208212 saml_request = base64 .b64encode (bytes (request_xml , 'UTF-8' )).decode ('utf-8' )
209-
210213 http_response = render (request , post_binding_form_template , {
211214 'target_url' : location ,
212215 'params' : {
You can’t perform that action at this time.
0 commit comments