filebrowser/types/auth.go
Henrique Dias 6811f205b4 feat: global rules
License: MIT
Signed-off-by: Henrique Dias <hacdias@gmail.com>
2019-01-03 23:29:33 +00:00

15 lines
338 B
Go

package types
import "net/http"
// AuthMethod describes an authentication method.
type AuthMethod string
// Auther is the authentication interface.
type Auther interface {
// Auth is called to authenticate a request.
Auth(*http.Request) (*User, error)
// SetInstance attaches the File Browser instance.
SetInstance(*FileBrowser)
}