mirror of
https://github.com/fhmq/hmq.git
synced 2026-04-24 10:38:34 +00:00
update authhttp
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user