WIP: form attachments tests
Co-Authored-By: Claude Fable 5.2 <[email protected]>
This commit is contained in:
co-authored by
Claude Fable 5.2
parent
6003b3d7d7
commit
02b1e96d3d
@@ -91,6 +91,9 @@ function readGraphEnv(): GraphEnv | null {
|
||||
*/
|
||||
const tokenCache = new Map<string, { expiresAt: number; token: string }>()
|
||||
|
||||
/** Forgets cached Graph tokens (after rotating the client secret in a running process; tests). */
|
||||
export const clearGraphTokenCache = (): void => tokenCache.clear()
|
||||
|
||||
async function getAccessToken(env: GraphEnv, fetchImpl: typeof fetch = fetch): Promise<string> {
|
||||
const cacheKey = `${env.tenantId}:${env.clientId}`
|
||||
const cached = tokenCache.get(cacheKey)
|
||||
|
||||
Reference in New Issue
Block a user