session

package
v0.0.0-...-9b2948e Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// ContextUserIDKey is the key used to store the user id in the context.
	ContextUserIDKey = Session("user-id")
)

Variables

View Source
var ErrMetadataNotFound = errors.New("metadata not found")
View Source
var ErrSessionNotFound = errors.New("session not found")
View Source
var ErrUserIDNotFound = errors.New("user-id not found")

Functions

func GetSession

func GetSession(ctx context.Context) *ory.Session

func GetUserID

func GetUserID(ctx context.Context) string

func WithSession

func WithSession(ctx context.Context, session *ory.Session) context.Context

func WithUserID

func WithUserID(ctx context.Context, userID string) context.Context

Types

type Session

type Session string

func (Session) String

func (s Session) String() string

String returns the string representation of the session.

Jump to

Keyboard shortcuts

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