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

Function principalFromToken

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

Source from the content-addressed store, hash-verified

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

Callers 1

finishAuthorizedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected