def process_response(self, request_id=None):
self.__errors = []<EOL>self.__error_reason = None<EOL>if '<STR_LIT>' in self.__request_data and '<STR_LIT>' in self.__request_data['<STR_LIT>']:<EOL><INDENT>response = OneLogin_Saml2_Response(self.__settings, self.__request_data['<STR_LIT>']['<STR_LIT>'])<EOL>self.__last_response = response.get_xml_document()<EOL>if response.is_valid(self.__request_data, request_id):<EOL><INDENT>self.__attributes = response.get_attributes()<EOL>self.__nameid = response.get_nameid()<EOL>self.__nameid_format = response.get_nameid_format()<EOL>self.__session_index = response.get_session_index()<EOL>self.__session_expiration = response.get_session_not_on_or_after()<EOL>self.__last_message_id = response.get_id()<EOL>self.__last_assertion_id = response.get_assertion_id()<EOL>self.__last_authn_contexts = response.get_authn_contexts()<EOL>self.__last_assertion_not_on_or_after = response.get_assertion_not_on_or_after()<EOL>self.__authenticated = True<EOL><DEDENT>else:<EOL><INDENT>self.__errors.append('<STR_LIT>')<EOL>self.__error_reason = response.get_error()<EOL><DEDENT><DEDENT>else:<EOL><INDENT>self.__errors.append('<STR_LIT>')<EOL>raise OneLogin_Saml2_Error(<EOL>'<STR_LIT>',<EOL>OneLogin_Saml2_Error.SAML_RESPONSE_NOT_FOUND<EOL>)<EOL><DEDENT>
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