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

Function principalFromToken

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

Source from the content-addressed store, hash-verified

71 * Forbidden branch already rejected the no-org case before Authenticated.
72 */
73const principalFromToken = (token: VerifiedToken, organizationId: string): Principal => ({
74 accountId: token.accountId,
75 organizationId,
76 organizationName: "",
77 email: "",
78 name: null,
79 avatarUrl: null,
80 roles: [],
81});
82
83export const cloudMcpAuthProviderLayer: Layer.Layer<
84 McpAuthProvider,

Callers 1

finishAuthorizedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected