session

package
v0.31.4 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	HeaderAsertoSessionID          = CtxKey(textproto.CanonicalMIMEHeaderKey("Aserto-Session-Id"))
	HeaderAsertoSessionIDLowercase = CtxKey(strings.ToLower(string(HeaderAsertoSessionID)))
)
View Source
var (
	ErrMissingHeader = errors.New("missing required header")
)

Functions

func CheckSessionID

func CheckSessionID(id string) error

CheckSessionID returns an error if the id doesn't look like an session ID.

func ContextWithSessionID

func ContextWithSessionID(ctx context.Context, sessionID string) context.Context

func ExtractSessionID

func ExtractSessionID(ctx context.Context) string

ExtractSessionID extracts a session id from a context.

func NewSessionID

func NewSessionID() (string, error)

NewSessionID creates a new session ID.

Types

type CtxKey

type CtxKey string

type HeaderMiddleware

type HeaderMiddleware struct {
	DisableValidation bool
}

func (*HeaderMiddleware) HTTP

func (*HeaderMiddleware) Stream

func (*HeaderMiddleware) Unary

Jump to

Keyboard shortcuts

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