authorization

package
v0.2.41 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2024 License: Apache-2.0 Imports: 6 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClientCertFromContext

func ClientCertFromContext(ctx context.Context) (string, error)

func ExtractClientCert

func ExtractClientCert(ctx context.Context, header http.Header) (context.Context, error)

ExtractClientCert is called from the API to either propagate an existing certificate to the context, or to extract one from headers injected by TLS termination.

func InjectClientCert

func InjectClientCert(ctx context.Context, header http.Header)

InjectClientCert is called by clients to propagate the client certificate that started the call chain, and thus owns the access token, to the next server.

func NewContextWithClientCert

func NewContextWithClientCert(ctx context.Context, clientCert string) context.Context

NewContextWithClientCert is used to propagate the client certificate to other clients. The client certificate parameter is passed verbatim from the TLS termination header, so should be a url encoded string.

func NewContextWithUserinfo

func NewContextWithUserinfo(ctx context.Context, userinfo *identityapi.Userinfo) context.Context

func UserinfoFromContext

func UserinfoFromContext(ctx context.Context) (*identityapi.Userinfo, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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