MCPcopy Create free account
hub / github.com/adcontextprotocol/adcp / apiKeyHasPermission

Function apiKeyHasPermission

server/src/middleware/auth.ts:250–252  ·  view source on GitHub ↗

* Check if validated API key has a specific permission

(apiKey: ValidatedApiKey, permission: string)

Source from the content-addressed store, hash-verified

248 * Check if validated API key has a specific permission
249 */
250function apiKeyHasPermission(apiKey: ValidatedApiKey, permission: string): boolean {
251 return apiKey.permissions.includes(permission);
252}
253
254/**
255 * Validated OAuth bearer token — a WorkOS-signed JWT issued via the

Callers 1

requireAdminFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected