MCPcopy Index your code
hub / github.com/codeaashu/claude-code / getFromRequest

Method getFromRequest

src/server/web/auth/adapter.ts:154–161  ·  view source on GitHub ↗

Returns the session data for the current request, or null.

(req: IncomingMessage)

Source from the content-addressed store, hash-verified

152
153 /** Returns the session data for the current request, or null. */
154 getFromRequest(req: IncomingMessage): SessionData | null {
155 const cookies = parseCookies(req.headers.cookie ?? "");
156 const signed = cookies[COOKIE_NAME];
157 if (!signed) return null;
158 const id = this.unsign(signed);
159 if (!id) return null;
160 return this.get(id) ?? null;
161 }
162
163 /** Returns the raw session ID from the request cookie, or null. */
164 getIdFromRequest(req: IncomingMessage): string | null {

Callers 2

authenticateMethod · 0.80
authenticateMethod · 0.80

Calls 3

unsignMethod · 0.95
getMethod · 0.95
parseCookiesFunction · 0.85

Tested by

no test coverage detected