def create_session_login_token(self, query_params, allowed_origin='<STR_LIT>'):
self.clean_error()<EOL>try:<EOL><INDENT>url = self.get_url(Constants.SESSION_LOGIN_TOKEN_URL)<EOL>headers = self.get_authorized_headers()<EOL>if allowed_origin:<EOL><INDENT>headers.update({'<STR_LIT>': allowed_origin})<EOL><DEDENT>response = self.execute_call('<STR_LIT>', url, headers=headers, json=query_params)<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>return self.handle_session_token_response(response)<EOL><DEDENT>else:<EOL><INDENT>self.error = str(response.status_code)<EOL>self.error_description = self.extract_error_message_from_response(response)<EOL><DEDENT><DEDENT>except Exception as e:<EOL><INDENT>self.error = <NUM_LIT><EOL>self.error_description = e.args[<NUM_LIT:0>]<EOL><DEDENT>
Generates a session login token in scenarios in which MFA may or may not be required.
A session login token expires two minutes after creation.

:param query_params: Query Parameters (username_or_email, password, subdomain, return_to_url,
                                       ip_address, browser_id)
:type query_params: dict

:param allowed_origin: Custom-Allowed-Origin-Header. Required for CORS requests only.
                       Set to the Origin URI from which you are allowed to send a request
                       using CORS.
:type allowed_origin: string

Returns a session token
:return: return the object if success
:rtype: SessionTokenInfo/SessionTokenMFAInfo

See https://developers.onelogin.com/api-docs/1/users/create-session-login-token Create Session Login Token documentation