auth

package
v0.0.0-...-86d74e7 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Authenticate

func Authenticate(rw http.ResponseWriter, username, password, basepath string)

func IsAuthenticated

func IsAuthenticated(req *http.Request, username, password string) bool

func Logout

func Logout(rw http.ResponseWriter, basepath string)

func StringsEqual

func StringsEqual(p1, p2 string) bool

Types

type Middleware

type Middleware struct {
	Username string
	Password string
	BasePath string
	Public   []string
	DB       *storage.Storage
}

func (*Middleware) Handler

func (m *Middleware) Handler(c *router.Context)

Jump to

Keyboard shortcuts

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