MCPcopy Create free account
hub / github.com/Waishnav/devspace / validCodeRecord

Method validCodeRecord

src/oauth-provider.ts:263–272  ·  view source on GitHub ↗
(
    client: OAuthClientInformationFull,
    authorizationCode: string,
  )

Source from the content-addressed store, hash-verified

261 }
262
263 private validCodeRecord(
264 client: OAuthClientInformationFull,
265 authorizationCode: string,
266 ): AuthorizationCodeRecord {
267 const record = this.codes.get(authorizationCode);
268 if (!record || record.clientId !== client.client_id || record.expiresAtMs < Date.now()) {
269 throw new InvalidGrantError("Invalid authorization code");
270 }
271 return record;
272 }
273
274 private issueTokens(
275 clientId: string,

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected