Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TokenFunc ¶
func New ¶
func New(config config.Authentication, namespacesEnabled bool, logger logrus.FieldLogger, apikey authValidator, oidc authValidator, ) TokenFunc
New provides an OpenAPI compatible token validation function that validates the token either as OIDC or as an StaticAPIKey token depending on which is configured. If both are configured, the scheme is figured out at runtime.
On namespace-enabled clusters every authenticated principal must be either namespace-confined or a global operator; the returned function rejects any principal that is neither (see assertClassified).
Click to show internal directories.
Click to hide internal directories.