* update

* update auth file

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

No files matched your search

+4
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{}
}