File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change 37
37
UnsolicitedResponse )
38
38
from saml2 .s_utils import UnsupportedBinding
39
39
from saml2 .sigver import MissingKey
40
+ from saml2 .samlp import AuthnRequest
40
41
from saml2 .validate import ResponseLifetimeExceed , ToEarly
41
42
from saml2 .xmldsig import ( # support for SHA1 is required by spec
42
43
SIG_RSA_SHA1 , SIG_RSA_SHA256 )
@@ -205,6 +206,9 @@ def login(request,
205
206
binding = binding ,
206
207
** kwargs )
207
208
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 )
208
212
saml_request = base64 .b64encode (bytes (request_xml , 'UTF-8' )).decode ('utf-8' )
209
213
210
214
http_response = render (request , post_binding_form_template , {
You can’t perform that action at this time.
0 commit comments