basic

package
v0.14.2 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2018 License: GPL-3.0 Imports: 7 Imported by: 10

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicAuth

type BasicAuth struct{}

BasicAuth is the type to map authentication methods to.

func (BasicAuth) AddRecord

func (BasicAuth) AddRecord(uid types.Uid, secret []byte, lifetime time.Duration) (int, auth.AuthErr)

AddRecord adds a basic authentication record to DB.

func (BasicAuth) Authenticate

func (BasicAuth) Authenticate(secret []byte) (types.Uid, int, time.Time, auth.AuthErr)

Authenticate checks login and password.

func (BasicAuth) GenSecret

func (BasicAuth) GenSecret(uid types.Uid, authLvl int, lifetime time.Duration) ([]byte, time.Time, auth.AuthErr)

GenSecret is not supported, generates an error.

func (BasicAuth) Init

func (BasicAuth) Init(unused string) error

Init initializes the basic authenticator.

func (BasicAuth) IsUnique

func (BasicAuth) IsUnique(secret []byte) (bool, auth.AuthErr)

IsUnique checks login uniqueness.

func (BasicAuth) UpdateRecord

func (BasicAuth) UpdateRecord(uid types.Uid, secret []byte, lifetime time.Duration) auth.AuthErr

UpdateRecord updates password for basic authentication.

Jump to

Keyboard shortcuts

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