state

package
v1.22.7 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SessionNoState                     = "0"
	SessionStateEmpty                  = "1"
	SessionStateInitial                = "2"
	SessionStateAuthenticated          = "3"
	SessionStateExpired                = "4"
	SessionStateInvalid                = "5"
	SessionStateAuthenticatedEmptyUser = "6"
	SessionStateExpiredEmptyUser       = "7"
)

Variables

View Source
var ErrInvalid = errors.New("invalid state")

Functions

This section is empty.

Types

type ClientIdentifier added in v1.8.0

type ClientIdentifier struct {
	CID                  uint64
	KID                  uint64
	SessionID            string
	UsernameIsDefined    int
	AuthFailedReasonFile string
	AuthControlFile      string
}

type State

type State struct {
	Client       ClientIdentifier
	IPAddr       string
	IPPort       string
	CommonName   string
	SessionState string
	Issued       int64
}

func New

func New(client ClientIdentifier, ipAddr, ipPort, commonName, sessionState string) State

func NewWithEncodedToken added in v1.20.1

func NewWithEncodedToken(encodedState, secretKey string) (State, error)

func (*State) Encode

func (state *State) Encode(secretKey string) (string, error)

Jump to

Keyboard shortcuts

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