Documentation
¶
Index ¶
- Constants
- func GetAuthOptionARPKG() func(client *ar_pkg.Client) error
- func GetXApiKeyOptionAR() func(client *ar.Client) error
- func GetXApiKeyOptionARV2() func(client *ar_v2.Client) error
- func GetXApiKeyOptionARV3() func(client *ar_v3.Client) error
- func IsJWTToken(token string) bool
- func SetAuthHeader(req *http.Request)
Constants ¶
View Source
const ( // JWTTokenPrefix marks a CIManager-issued JWT so we route it via the // Authorization header rather than the API-key header. JWTTokenPrefix = "CIManager" )
Variables ¶
This section is empty.
Functions ¶
func GetAuthOptionARPKG ¶ added in v1.1.2
func GetXApiKeyOptionAR ¶
GetXApiKeyOptionAR TODO Generics will be difficult coz of RequestEditors but there are possibility of optimisations
func GetXApiKeyOptionARV2 ¶ added in v1.3.0
func GetXApiKeyOptionARV3 ¶ added in v1.3.4
func IsJWTToken ¶ added in v1.3.40
IsJWTToken reports whether the given auth token should be routed via the Authorization header (JWT) instead of x-api-key (PAT / API key).
func SetAuthHeader ¶ added in v1.3.40
SetAuthHeader writes the correct auth header for the current AuthToken. JWT tokens (CIManager-prefixed) go to Authorization; everything else goes to x-api-key. Only one header is ever set — mixing both causes gateways that length-check x-api-key to reject the request outright.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.