2019-01-06 06:44:33 +08:00
|
|
|
package auth
|
|
|
|
|
|
|
|
import (
|
|
|
|
"net/http"
|
|
|
|
|
|
|
|
"github.com/filebrowser/filebrowser/v2/users"
|
|
|
|
)
|
|
|
|
|
|
|
|
// Auther is the authentication interface.
|
|
|
|
type Auther interface {
|
|
|
|
// Auth is called to authenticate a request.
|
2019-01-08 04:34:44 +08:00
|
|
|
Auth(r *http.Request, s *users.Storage, root string) (*users.User, error)
|
2019-02-15 20:58:45 +08:00
|
|
|
// LoginPage indicates if this auther needs a login page.
|
|
|
|
LoginPage() bool
|
2019-01-06 06:44:33 +08:00
|
|
|
}
|