]> Sergey Matveev's repositories - godlighty.git/blobdiff - cfg.go
Authentication and authorization
[godlighty.git] / cfg.go
diff --git a/cfg.go b/cfg.go
index 1aa243a8c901064442cfcca2f2ba7978d9d79848..9bc1206076bd399dae9d8c752f3f0a28f6b87a24 100644 (file)
--- a/cfg.go
+++ b/cfg.go
@@ -25,6 +25,14 @@ type TLSCfg struct {
        Cert   string
        Key    string
        CACert string
+
+       // Require client authentication
+       ClientCAs []string
+}
+
+type AuthCfg struct {
+       Passwords string
+       Realm     string
 }
 
 type Hook func(http.ResponseWriter, *http.Request) bool
@@ -35,6 +43,7 @@ type HostCfg struct {
        DirList bool
        WebDAV  bool
        Hooks   []Hook
+       Auth    *AuthCfg
 
        Indexes []string
        Readmes []string