Documentation
¶
Index ¶
- func GetBearerToken(r *http.Request) (string, error)
- func GetCertificate(ctx context.Context, path string) (*x509.CertPool, error)
- func GetEncodedHash(s string) string
- func GetStringFromFile(ctx context.Context, path string) (string, error)
- func SliceContains(s []string, str string) bool
- func StripWebSocketBearer(old string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetBearerToken ¶
GetBearerToken returns the Bearer token or an error
func GetCertificate ¶
GetCertificate returns a *x509.CertPool or error
func GetEncodedHash ¶
GetEncodedHash returns the hex encoded sha256 sum of the input string
func GetStringFromFile ¶
GetStringFromFile returns a string or error
func SliceContains ¶ added in v0.0.9
SliceContains checks if a slice contains a string
func StripWebSocketBearer ¶ added in v0.0.8
StripWebSocketBearer takes the string from the header Sec-WebSocket-Protocol (r.Header.Get("Sec-WebSocket-Protocol")) and removes any bearer (base64url.bearer.authorization.k8s.io.<bearer>)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.