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

Method authenticate

src/server/web/auth/oauth-auth.ts:116–128  ·  view source on GitHub ↗
(req: IncomingMessage)

Source from the content-addressed store, hash-verified

114 }
115
116 authenticate(req: IncomingMessage): AuthUser | null {
117 const session = this.store.getFromRequest(req);
118 if (!session) return null;
119 return {
120 id: session.userId,
121 email: session.email,
122 name: session.name,
123 isAdmin:
124 session.isAdmin ||
125 this.adminUsers.has(session.userId) ||
126 (session.email ? this.adminUsers.has(session.email) : false),
127 };
128 }
129
130 setupRoutes(app: Application): void {
131 // GET /auth/login — redirect to the identity provider

Callers 1

requireAuthMethod · 0.95

Calls 2

getFromRequestMethod · 0.80
hasMethod · 0.45

Tested by

no test coverage detected