feat: add main command feat: add todos feat: add signup api feat: do not repeat code fix: user return feat: work out static box fix: setup static handlers feat: add share types License: MIT Signed-off-by: Henrique Dias <hacdias@gmail.com> feat: start static License: MIT Signed-off-by: Henrique Dias <hacdias@gmail.com> feat: bring back more features License: MIT Signed-off-by: Henrique Dias <hacdias@gmail.com> add feat: readd more files License: MIT Signed-off-by: Henrique Dias <hacdias@gmail.com> feat: add dockerignore License: MIT Signed-off-by: Henrique Dias <hacdias@gmail.com> feat: gitignore License: MIT Signed-off-by: Henrique Dias <hacdias@gmail.com> feat: readd submodule License: MIT Signed-off-by: Henrique Dias <hacdias@gmail.com>
21 lines
403 B
Go
21 lines
403 B
Go
package auth
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/filebrowser/filebrowser/types"
|
|
)
|
|
|
|
// MethodNoAuth is used to identify no auth.
|
|
const MethodNoAuth types.AuthMethod = "noauth"
|
|
|
|
// NoAuth is no auth implementation of auther.
|
|
type NoAuth struct {
|
|
Store types.UsersStore `json:"-"`
|
|
}
|
|
|
|
// Auth uses authenticates user 1.
|
|
func (a NoAuth) Auth(r *http.Request) (*types.User, error) {
|
|
return a.Store.Get(1)
|
|
}
|