Documentation
¶
Index ¶
Constants ¶
View Source
const AuthorizationHeader = "Authorization"
View Source
const BearerPrefix = "Bearer "
View Source
const ContentTypeHeader = "Content-Type"
View Source
const ContentTypeValueJSON = "application/json"
View Source
const XAPIKeyHeader = "X-API-Key" // nolint: gosec
XAPIKeyHeader defines the header name for passing API keys. This is not a credential itself, but a standard HTTP header key.
Variables ¶
This section is empty.
Functions ¶
func APIKey ¶
APIKey extracts the API key from the request headers. It checks headers in the following order of precedence: 1. X-API-Key header (raw value) 2. Authorization header (with "Bearer " prefix removed if present) Returns an empty string if no API key is found.
func FlagSet ¶
func FlagSet(flagsetManager service.FlagsetManager, apiKey string) (*ffclient.GoFeatureFlag, *echo.HTTPError)
FlagSet retrieves the flagset for the given API key from the flagset manager This layer ensure that the flagset manager is initialized and that the API key is valid
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.