auth

package
v0.0.0-...-1e66b67 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2016 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthProvider

type AuthProvider interface {
	Login(user, pass string) (token string, err error)
}

type HtpasswdFile

type HtpasswdFile struct {
	Path  string
	Info  os.FileInfo
	Users map[string]string
}

func NewHtpasswdFile

func NewHtpasswdFile(filename string) *HtpasswdFile

func (*HtpasswdFile) CompareUsernameAndPassword

func (file *HtpasswdFile) CompareUsernameAndPassword(username, password string) error

func (*HtpasswdFile) GetPasswordForUser

func (file *HtpasswdFile) GetPasswordForUser(user string) (hash string, ok bool)

func (*HtpasswdFile) Reload

func (file *HtpasswdFile) Reload()

func (*HtpasswdFile) ReloadIfNeeded

func (file *HtpasswdFile) ReloadIfNeeded()

type HtpasswdProvider

type HtpasswdProvider struct {
	File *HtpasswdFile
}

func NewHtpasswdProvider

func NewHtpasswdProvider(file string) *HtpasswdProvider

func (*HtpasswdProvider) Login

func (p *HtpasswdProvider) Login(username string, password string) (string, error)

Jump to

Keyboard shortcuts

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