Skip to content

Trasversale · Package · Active

@platform/contracts-auth

Shared auth DTO and type contract reused by services and frontends to avoid duplicate auth shapes.

  • TypeScript declarations
  • Dual package exports

Spec sheet

Package name

@platform/contracts-auth

Repository path

platform-shared-packages/packages/contracts-auth

Exports

CommonJS and ESM entrypoints plus type declarations

Responsibilities

  • Define shared auth DTOs and response/request shapes.
  • Act as the contract package for auth-adjacent client wrappers.

Interfaces and contract surface

  • Package root export

Consumers

Notes

  • Use this package instead of redefining auth DTOs inside product repos.

Source references

  • platform-shared-packages/README.md
  • platform-shared-packages/packages/contracts-auth/package.json

Session permissions

PlatformSessionIdentity espone permissions?: string[] oltre a membership, provider e metodo auth. Espone anche capabilities?: string[], risolte a runtime da platform-auth-service sui grant di ruolo e membership.

I BFF devono usare capabilities per abilitare funzioni CORE e tool MCP. Le permissions restano disponibili come scope legacy trasversali, ma non devono abilitare automaticamente capability runtime.

Ogni PlatformMembership espone productCode, subjectId, tenantId, role e attributes; tenantId e role possono essere null quando la membership non li valorizza.

Workspace reference: /Users/jeanpaul/projects/cs-repository