local

package
v0.8.8 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const MaxFailed uint32 = 5

Variables

This section is empty.

Functions

This section is empty.

Types

type Local

type Local struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewAuthProvider

func NewAuthProvider(file string, loginExpiry, sessionExpiry string, allowOTPLogin bool) (*Local, error)

func (*Local) Authenticate

func (p *Local) Authenticate(uid, pwd string) (token string, err error)

func (*Local) Authenticated

func (p *Local) Authenticated(cookie string) (string, string, string, error)

func (*Local) Invalidate

func (p *Local) Invalidate(tokenType auth.TokenType, cookie string) error

func (*Local) Options added in v0.8.3

func (p *Local) Options(uid, role string) auth.Options

func (*Local) Preauthenticate

func (p *Local) Preauthenticate() (string, error)

func (*Local) Validate

func (p *Local) Validate(uid, pwd string) error

func (*Local) Verify

func (p *Local) Verify(tokenType auth.TokenType, cookie string) error

Jump to

Keyboard shortcuts

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