Help us shape the future of Go! Take the 2026 Go Developer Survey

session

package
v0.20.4 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Overview

Package session provides the service.module.grpc.session module: a gRPC service module that registers the kms.api.cmk.sessionmanager.session.v1.Service proto onto a grpc.ServiceRegistrar supplied by app.module.grpcserver.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Module

type Module struct {
	Mod             string `yaml:"module"`
	Trust           string `yaml:"trust"        default:"trust.module.oidc"        dep:"sessionmanager.Trust"`
	SessionStore    string `yaml:"sessionStore" default:"sessionstore.module.valkey" dep:"session.Repository"`
	Credentials     string `yaml:"credentials"  default:"credentials.module.oauth2"  dep:"credentials.Provider"`
	AllowHttpScheme bool   `yaml:"allowHttpScheme"`
	// contains filtered or unexported fields
}

Module is the service.module.grpc.session module. It wires its three dependencies (trust, session store, credentials) by ID via ctx.GetModule and owns a *Server that implements the proto.

func (*Module) Module

func (m *Module) Module() sessionmanager.ModuleInfo

func (*Module) Provision

func (m *Module) Provision(ctx *sessionmanager.Context) error

func (*Module) Register

func (m *Module) Register(s grpc.ServiceRegistrar)

type Option

type Option func(*Server)

func WithAllowHttpScheme

func WithAllowHttpScheme(allow bool) Option

func WithCredentialsProvider added in v0.20.0

func WithCredentialsProvider(provider credentials.Provider) Option

type Server

type Server struct {
	sessionv1.UnimplementedServiceServer
	// contains filtered or unexported fields
}

func NewServer

func NewServer(
	ctx context.Context,
	sessionRepo internalsession.Repository,
	trust sessionmanager.Trust,
	idleSessionTimeout time.Duration,
	opts ...Option,
) *Server

func (*Server) GetOIDCProvider

GetOIDCProvider implements a compatibility level with the OIDC API. Deprecated: use GetTrust instead. TODO: remove this method once the lifecycle of deprecated and compatibility layers is reached to the end.

func (*Server) GetSession

func (*Server) GetTrust

Jump to

Keyboard shortcuts

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