state

package
v1.8.0-rc.4 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2023 License: MIT Imports: 5 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 added in v1.8.0

type ClientIdentifier struct {
	Cid                  uint64 `json:"c"`
	Kid                  uint64 `json:"k"`
	AuthFailedReasonFile string `json:"afr"`
	AuthControlFile      string `json:"ac"`
}

type State

type State struct {
	Client     ClientIdentifier `json:"c"`
	Ipaddr     string           `json:"ip"`
	CommonName string           `json:"cn"`
	Issued     time.Time        `json:"iss"`
	// contains filtered or unexported fields
}

func New

func New(client ClientIdentifier, ipaddr, commonName string) *State

func NewEncoded

func NewEncoded(state string) State

func (*State) Decode

func (state *State) Decode(secretKey string) error

func (*State) Encode

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

func (*State) Encoded

func (state *State) Encoded() string

Jump to

Keyboard shortcuts

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