code: def process_response(self, request_id=None):
          
          self.__errors = []
          self.__error_reason = None
  
          if 'post_data' in self.__request_data and 'SAMLResponse' in self.__request_data['post_data']:
              # AuthnResponse -- HTTP_POST Binding
              response = OneLogin_Saml2_Response(self.__settings, self.__request_data['post_data']['SAMLResponse'])
              self.__last_response = response.get_xml_document()
  
              if response.is_valid(self.__request_data, request_id):
                  self.__attributes = response.get_attributes()
                  self.__nameid = response.get_nameid()
                  self.__nameid_format = response.get_nameid_format()
                  self.__session_index = response.get_session_index()
                  self.__session_expiration = response.get_session_not_on_or_after()
                  self.__last_message_id = response.get_id()
                  self.__last_assertion_id = response.get_assertion_id()
                  self.__last_authn_contexts = response.get_authn_contexts()
                  self.__authenticated = True
                  self.__last_assertion_not_on_or_after = response.get_assertion_not_on_or_after()
  
              else:
                  self.__errors.append('invalid_response')
                  self.__error_reason = response.get_error()
  
          else:
              self.__errors.append('invalid_binding')
              raise OneLogin_Saml2_Error(
                  'SAML Response not found, Only supported HTTP_POST Binding',
                  OneLogin_Saml2_Error.SAML_RESPONSE_NOT_FOUND
              )
docs: Process the SAML Response sent by the IdP.
  
          :param request_id: Is an optional argument. Is the ID of the AuthNRequest sent by this SP to the IdP.
          :type request_id: string
  
          :raises: OneLogin_Saml2_Error.SAML_RESPONSE_NOT_FOUND, when a POST with a SAMLResponse is not found