UNPKG

wcz-layout

Version:

21 lines (20 loc) 1 kB
import { a as requirePermission, n as Platform } from "./utils-BBQ5S6oM.js"; import { t as getAccessToken } from "./msalClient-MNN6BwL6.js"; import i18next, { t } from "i18next"; import { scopes } from "virtual:wcz-layout"; import { createEnv } from "@t3-oss/env-core"; import { uuidv7 } from "uuidv7"; //#region src/lib/auth/msalServer.d.ts /** * On-Behalf-Of flow: Exchange user token for a token to call downstream API * Use when: Server needs to call microservice on behalf of the logged-in user */ declare const getTokenOnBehalfOf: (userToken: string, scopeKey: keyof typeof scopes) => Promise<string>; /** * Client Credentials flow: Get app-only token (no user context) * Use when: Background jobs, scheduled tasks, service-to-service calls */ declare const getAppToken: (scopeKey: keyof typeof scopes) => Promise<string>; //#endregion export { Platform, createEnv, getAccessToken, getAppToken, getTokenOnBehalfOf, i18next, requirePermission, t, uuidv7 }; //# sourceMappingURL=utils.d.ts.map