MCPcopy Index your code
hub / github.com/cloudquery/cloudquery / TeamFromToken

Function TeamFromToken

cli/internal/platform/inject.go:241–244  ·  view source on GitHub ↗

TeamFromToken returns the cloud team (`tm` claim) embedded in a cqpd_ token, or "" if absent/malformed. The CLI uses it to target the team-scoped plugin-download / usage endpoints (and premium entitlement) from the token alone — no `cloudquery login`. Read without verifying the signature; cloud stil

(token string)

Source from the content-addressed store, hash-verified

239// alone — no `cloudquery login`. Read without verifying the signature; cloud
240// still authenticates the token.
241func TeamFromToken(token string) string {
242 _, team := decodeCQPDClaims(token)
243 return team
244}
245
246// decodeCQPDClaims reads the unverified claims payload of a cqpd_ token. The CLI
247// only needs routing/identity hints (api_url, team) to decide where and as whom

Callers 2

TestTeamFromTokenFunction · 0.85
DownloadAuthFunction · 0.85

Calls 1

decodeCQPDClaimsFunction · 0.85

Tested by 1

TestTeamFromTokenFunction · 0.68