MCPcopy Create free account
hub / github.com/bewcloud/bewcloud / getDataFromRequest

Method getDataFromRequest

lib/models/multi-factor-auth.ts:121–133  ·  view source on GitHub ↗
(request: Request)

Source from the content-addressed store, hash-verified

119 }
120
121 static async getDataFromRequest(request: Request): Promise<{ user: User } | null> {
122 const cookies = getCookies(request.headers);
123
124 if (cookies[COOKIE_NAME]) {
125 const result = await this.getDataFromCookie(cookies[COOKIE_NAME]);
126
127 if (result) {
128 return result;
129 }
130 }
131
132 return null;
133 }
134
135 private static async getDataFromCookie(cookieValue: string): Promise<{ user: User } | null> {
136 if (!cookieValue) {

Callers

nothing calls this directly

Calls 1

getDataFromCookieMethod · 0.95

Tested by

no test coverage detected