Add a "null" auth backend

Not built by default, but can be added with `go build -tags nullauth`.
Enabled by running tokidoki with `-auth.url null://`. Very useful for
simpler debugging when you don't want manage test accounts with actual
passwords.
This commit is contained in:
Conrad Hoffmann 2024-02-01 14:21:43 +01:00
parent ddc11d4c7b
commit 1d871b000a
3 changed files with 50 additions and 0 deletions

View file

@ -18,6 +18,8 @@ func NewFromURL(authURL string) (AuthProvider, error) {
return NewIMAP(u.Host, true), nil
case "pam":
return NewPAM()
case "null":
return NewNull()
default:
return nil, fmt.Errorf("no auth provider found for %s:// URL", u.Scheme)
}