auth

package
v1.3.41 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 7, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

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 GetAuthOptionARPKG() func(client *ar_pkg.Client) error

func GetXApiKeyOptionAR

func GetXApiKeyOptionAR() func(client *ar.Client) error

GetXApiKeyOptionAR TODO Generics will be difficult coz of RequestEditors but there are possibility of optimisations

func GetXApiKeyOptionARV2 added in v1.3.0

func GetXApiKeyOptionARV2() func(client *ar_v2.Client) error

func GetXApiKeyOptionARV3 added in v1.3.4

func GetXApiKeyOptionARV3() func(client *ar_v3.Client) error

func IsJWTToken added in v1.3.40

func IsJWTToken(token string) bool

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

func SetAuthHeader(req *http.Request)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL