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)
| 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). |
| 128 | func 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 |
no test coverage detected