session

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CTC_EQUAL       = 1
	LENGTH          = 64
	SESSION_REFRESH = false
	SESSION_EXPIRE  = true
)

* Global constants.

Variables

This section is empty.

Functions

This section is empty.

Types

type Challenge

type Challenge interface {
	Nonce() [LENGTH]byte
	Salt() [LENGTH]byte
}

* A challenge for password-based authentication.

type Manager

type Manager interface {
	CreateToken(token []byte) Token
	Challenge(name string) (Challenge, error)
	Response(name string, hash []byte) (Token, error)
	Terminate(token Token) error
	UserName(token Token) (string, error)
}

* A session manager.

func CreateManager

func CreateManager(userManager user.Manager, prng io.Reader, expiry time.Duration) (Manager, error)

* Creates a new session manager.

type Token

type Token interface {
	Token() [LENGTH]byte
}

* A session token.

Jump to

Keyboard shortcuts

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