session

package
v0.5.18 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2026 License: MPL-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Package session handles user sessions.

Index

Constants

View Source
const (
	// session cookie stores the session token
	SessionCookie = "session"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Authenticator

type Authenticator struct {
	Client AuthenticatorClient
}

Authenticator authenticates requests to the UI.

func (*Authenticator) Authenticate

func (a *Authenticator) Authenticate(w http.ResponseWriter, r *http.Request) (authz.Subject, error)

type AuthenticatorClient

type AuthenticatorClient interface {
	GetSubject(ctx context.Context, token []byte) (authz.Subject, error)
}

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(logger logr.Logger, client SessionClient) *Service

func (*Service) StartSession

func (s *Service) StartSession(w http.ResponseWriter, r *http.Request, userID resource.TfeID) error

type SessionClient

type SessionClient interface {
	NewToken(subjectID resource.TfeID, expiry *time.Time) ([]byte, error)
}

Jump to

Keyboard shortcuts

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