MCPcopy Create free account
hub / github.com/TheSmallHanCat/flow2api / _extract_session_token

Function _extract_session_token

src/services/protocol_login.py:100–106  ·  view source on GitHub ↗
(headers: Any)

Source from the content-addressed store, hash-verified

98
99
100def _extract_session_token(headers: Any) -> Optional[str]:
101 for line in _get_set_cookies(headers):
102 first = str(line).split(";", 1)[0].strip()
103 if not first.startswith(f"{SESSION_COOKIE_NAME}="):
104 continue
105 return first.split("=", 1)[1].strip()
106 return None
107
108
109def _extract_redirect_from_html(text: str) -> Optional[str]:

Callers 1

loginMethod · 0.85

Calls 1

_get_set_cookiesFunction · 0.85

Tested by

no test coverage detected