mirror of
https://github.com/filebrowser/filebrowser.git
synced 2024-06-07 23:00:43 +00:00
802318f903
Supports json and yaml.
Former-commit-id: d36b07953ede1842942b7ab477effeb2e5aa7d5b [formerly 51d0d5691d19e0649935816779a34b1b700e088a] [formerly 342f636293be8e38e7907453a67c67e5e9195c78 [formerly 73b8d2ee7e
]]
Former-commit-id: 8ef6a1563ebe425a15a8229165d2ddb043cefb21 [formerly 01c4ac1d89e0d5c6ed16bb7f23c2bbe62085d6e5]
Former-commit-id: 6d197ee1931889571c61ad0920e4352d4b02b264
20 lines
457 B
Go
20 lines
457 B
Go
package auth
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/filebrowser/filebrowser/v2/settings"
|
|
"github.com/filebrowser/filebrowser/v2/users"
|
|
)
|
|
|
|
// MethodNoAuth is used to identify no auth.
|
|
const MethodNoAuth settings.AuthMethod = "noauth"
|
|
|
|
// NoAuth is no auth implementation of auther.
|
|
type NoAuth struct{}
|
|
|
|
// Auth uses authenticates user 1.
|
|
func (a NoAuth) Auth(r *http.Request, sto *users.Storage, root string) (*users.User, error) {
|
|
return sto.Get(root, 1)
|
|
}
|