MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / principalFromToken

Function principalFromToken

apps/cloud/src/mcp/auth-provider.ts:96–104  ·  view source on GitHub ↗
(token: VerifiedToken, organizationId: string)

Source from the content-addressed store, hash-verified

94 * Forbidden branch already rejected the no-org case before Authenticated.
95 */
96const principalFromToken = (token: VerifiedToken, organizationId: string): Principal => ({
97 accountId: token.accountId,
98 organizationId,
99 organizationName: "",
100 email: "",
101 name: null,
102 avatarUrl: null,
103 roles: [],
104});
105
106export const cloudMcpAuthProviderLayer: Layer.Layer<
107 McpAuthProvider,

Callers 1

finishAuthorizedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected