state

package
v1.21.6 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

This section is empty.

Types

type ClientIdentifier

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
	Issued     int64
}

func New

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

func NewWithEncodedToken

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