auth: add PAM support

Handy for small local installations.

Disabled by default because it adds a dependency on the PAM
library.
This commit is contained in:
Simon Ser 2022-09-10 17:13:20 +00:00 committed by Conrad Hoffmann
parent 228384530e
commit 10587f425b
6 changed files with 99 additions and 1 deletions

View file

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