add basic auth for webapi

This commit is contained in:
ginuerzh
2022-02-12 21:05:39 +08:00
parent fdd67a6086
commit f2d806886a
12 changed files with 197 additions and 86 deletions

View File

@ -35,7 +35,7 @@ func ParseAuther(cfg *config.AutherConfig) auth.Authenticator {
return auth.NewMapAuthenticator(m)
}
func autherFromAuth(au *config.AuthConfig) auth.Authenticator {
func ParseAutherFromAuth(au *config.AuthConfig) auth.Authenticator {
if au == nil || au.Username == "" {
return nil
}