local

package
v0.8.9 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2024 License: MIT Imports: 14 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, adminRole string) (*Local, error)

func (*Local) AdminRole added in v0.8.9

func (p *Local) AdminRole() string

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