* update

* update auth file

* fixbug
This commit is contained in:
joy.zhou
2019-11-11 11:41:38 +08:00
committed by GitHub
parent 896769fd9d
commit 4c107c67ab
3 changed files with 8 additions and 4 deletions

View File

@@ -1,11 +1,13 @@
package auth
import (
authfile "github.com/fhmq/hmq/plugins/auth/authfile"
"github.com/fhmq/hmq/plugins/auth/authhttp"
)
const (
AuthHTTP = "authhttp"
AuthFile = "authfile"
)
type Auth interface {
@@ -17,6 +19,8 @@ func NewAuth(name string) Auth {
switch name {
case AuthHTTP:
return authhttp.Init()
case AuthFile:
return authfile.Init()
default:
return &mockAuth{}
}