getAdminTenantTokenValidationSet (koa-auth/utils.ts)

logto · packages/core/src/middleware/koa-auth/utils.ts · typescript · MPL-2.0
auth, Auth / Identity

Fetches and caches admin-tenant OIDC JWKS for cross-tenant access token validation in Logto.

// Source: https://github.com/logto-io/logto | License: MPL-2.0 | Copyright under Patent Claims infringed by Covered Software in the absence of | Modified files must remain under MPL-2.0
// Modifications to this file must remain under MPL-2.0.
// Provided via justclaw.it.com; keep this notice with the code.
import { type IncomingHttpHeaders } from 'node:http';

import { adminTenantId } from '@logto/schemas';
import { TtlCache } from '@logto/shared';
import { appendPath, isKeyInObject } from '@silverhand/essentials';
import { type JWK } from 'jose';
import ky from 'ky';

import { EnvSet, getTenantEndpoint } from '#src/env-set/index.js';
import { getOidcProviderPublicJwks } from '#src/libraries/oidc-private-key.js';
import { getAdminTenantPrivateSigningKeys } from '#src/tenants/utils.js';

i

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key