Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractBearerToken ¶
ExtractBearerToken (if any) from the supplied request.
Types ¶
type Credentials ¶
type Credentials struct { BearerToken string BasicUsername string BasicPassword string Impersonate Impersonation }
Credentials that a caller may pass to xgql in order to authenticate to a Kubernetes API server.
func FromContext ¶
func FromContext(ctx context.Context) (Credentials, bool)
FromContext extracts credentials from the supplied context.
func (Credentials) Hash ¶
func (c Credentials) Hash(extra []byte) string
Hash returns a SHA-256 hash of the supplied credentials, plus any extra bytes that were supplied.
type Impersonation ¶
Impersonation specifies a subject to impersonate. Impersonation configuration does not consistute credentials; it must be supplied alongside credentials for a subject that has been granted RBAC access to impersonate.
func ExtractImpersonation ¶
func ExtractImpersonation(r *http.Request) Impersonation
ExtractImpersonation configuration (if any) from the supplied request.
Click to show internal directories.
Click to hide internal directories.