update authhttp

This commit is contained in:
joy.zhou
2019-08-23 16:22:59 +08:00
parent 8d8707801f
commit ea055d5929

View File

@@ -138,8 +138,8 @@ func (a *authHTTP) CheckConnect(clientID, username, password string) bool {
// } // }
//CheckACL check mqtt connect //CheckACL check mqtt connect
func (a *authHTTP) CheckACL(username, access, topic string) bool { func (a *authHTTP) CheckACL(action, username, topic string) bool {
action := access
{ {
aCache := checkCache(action, "", username, "", topic) aCache := checkCache(action, "", username, "", topic)
if aCache != nil { if aCache != nil {
@@ -159,7 +159,7 @@ func (a *authHTTP) CheckACL(username, access, topic string) bool {
data.Add("username", username) data.Add("username", username)
data.Add("topic", topic) data.Add("topic", topic)
data.Add("access", access) data.Add("access", action)
req.URL.RawQuery = data.Encode() req.URL.RawQuery = data.Encode()
// fmt.Println("req:", req) // fmt.Println("req:", req)
resp, err := a.client.Do(req) resp, err := a.client.Do(req)