filebrowser/backend/auth/auth.go

17 lines
431 B
Go
Raw Normal View History

package auth
import (
"net/http"
2023-06-15 01:08:09 +00:00
"github.com/gtsteffaniak/filebrowser/settings"
"github.com/gtsteffaniak/filebrowser/users"
)
// Auther is the authentication interface.
type Auther interface {
// Auth is called to authenticate a request.
2021-09-13 13:47:06 +00:00
Auth(r *http.Request, usr users.Store, stg *settings.Settings, srv *settings.Server) (*users.User, error)
// LoginPage indicates if this auther needs a login page.
LoginPage() bool
}