File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -119,15 +119,16 @@ def handle_saml_endpoint_response(self, response):
119119 saml_endpoint_response = None
120120 try :
121121 content = response .json ()
122- if content and 'status' in content and 'data' in content and ' message' in content ['status' ] and 'type' in content ['status' ]:
122+ if content and 'status' in content and 'message' in content ['status' ] and 'type' in content ['status' ]:
123123 status_type = content ['status' ]['type' ]
124124 status_message = content ['status' ]['message' ]
125125 saml_endpoint_response = SAMLEndpointResponse (status_type , status_message )
126- if status_message == 'Success' :
127- saml_endpoint_response .saml_response = content ['data' ]
128- else :
129- mfa = MFA (content ['data' ][0 ])
130- saml_endpoint_response .mfa = mfa
126+ if 'data' in content :
127+ if status_message == 'Success' :
128+ saml_endpoint_response .saml_response = content ['data' ]
129+ else :
130+ mfa = MFA (content ['data' ][0 ])
131+ saml_endpoint_response .mfa = mfa
131132 except :
132133 pass
133134 return saml_endpoint_response
You can’t perform that action at this time.
0 commit comments