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

Function apiURLFromToken

cli/internal/platform/inject.go:128–131  ·  view source on GitHub ↗

apiURLFromToken reads the api_url (`u`) claim from a cqpd_ token's payload without verifying the signature. Returns "" for a malformed token or one that carries no url. Mirrors the destination plugin's decoder (separate repos).

(token string)

Source from the content-addressed store, hash-verified

126// without verifying the signature. Returns "" for a malformed token or one that
127// carries no url. Mirrors the destination plugin's decoder (separate repos).
128func apiURLFromToken(token string) string {
129 apiURL, _ := decodeCQPDClaims(token)
130 return apiURL
131}
132
133// platformToken returns the platform-destination cqpd_ token from its explicit
134// CQ_PLATFORM_TOKEN env, or from CLOUDQUERY_API_KEY when that holds a cqpd_ (the

Callers 2

DetectTenantFunction · 0.85

Calls 1

decodeCQPDClaimsFunction · 0.85

Tested by

no test coverage detected