usersession

package
v0.0.0-...-6f239a5 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CommandCheckSession = herbsystem.Command("checksession")
View Source
var CommandGetSession = herbsystem.Command("getsession")
View Source
var CommandInitPayloads = herbsystem.Command("initpayloads")
View Source
var CommandOnSessionActive = herbsystem.Command("onsessionactive")
View Source
var CommandRevokeSession = herbsystem.Command("revokesession")
View Source
var ContextKeyCheckSessionResult = usersystem.ContextKey("usersession.result")
View Source
var ContextKeySessionID = usersystem.ContextKey("sessionid")
View Source
var ContextSessionRevokeCode = usersystem.ContextKey("sessionrevokecode")

Functions

func GetSessionID

func GetSessionID(ctx context.Context) string

func GetSessionRevokeCode

func GetSessionRevokeCode(ctx context.Context) string

func MustExecCheckSession

func MustExecCheckSession(s *usersystem.UserSystem, session *usersystem.Session) bool

func MustExecOnSessionActive

func MustExecOnSessionActive(s *usersystem.UserSystem, session *usersystem.Session)

func MustExecRevokeSession

func MustExecRevokeSession(s *usersystem.UserSystem, session *usersystem.Session) bool

func WrapCheckSession

func WrapCheckSession(h func(ctx context.Context, session *usersystem.Session) bool) *herbsystem.Action

func WrapGetSession

func WrapGetSession(h func(st usersystem.SessionType, id string) *usersystem.Session) *herbsystem.Action

func WrapOnSessionActive

func WrapOnSessionActive(h func(*usersystem.Session)) *herbsystem.Action

func WrapRevokeSession

func WrapRevokeSession(h func(st usersystem.SessionType, code string) bool) *herbsystem.Action

Types

type Result

type Result struct {
	Success bool
}

func GetResult

func GetResult(ctx context.Context) *Result

Jump to

Keyboard shortcuts

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