Skip to content

Commit

Permalink
Remove unused parameter from jwtRequest()
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavel Tolstov committed Jun 15, 2022
1 parent 4e1c35b commit 55321df
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions backends/jwt_remote.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ func (o *remoteJWTChecker) GetUser(token string) (bool, error) {
}
}

return o.jwtRequest(o.host, o.userUri, token, dataMap, urlValues)
return o.jwtRequest(o.userUri, token, dataMap, urlValues)
}

func (o *remoteJWTChecker) GetSuperuser(token string) (bool, error) {
Expand All @@ -212,7 +212,7 @@ func (o *remoteJWTChecker) GetSuperuser(token string) (bool, error) {
}
}

return o.jwtRequest(o.host, o.superuserUri, token, dataMap, urlValues)
return o.jwtRequest(o.superuserUri, token, dataMap, urlValues)
}

func (o *remoteJWTChecker) CheckAcl(token, topic, clientid string, acc int32) (bool, error) {
Expand Down Expand Up @@ -240,14 +240,14 @@ func (o *remoteJWTChecker) CheckAcl(token, topic, clientid string, acc int32) (b
urlValues.Add("username", username)
}

return o.jwtRequest(o.host, o.aclUri, token, dataMap, urlValues)
return o.jwtRequest(o.aclUri, token, dataMap, urlValues)
}

func (o *remoteJWTChecker) Halt() {
// NO-OP
}

func (o *remoteJWTChecker) jwtRequest(host, uri, token string, dataMap map[string]interface{}, urlValues url.Values) (bool, error) {
func (o *remoteJWTChecker) jwtRequest(uri, token string, dataMap map[string]interface{}, urlValues url.Values) (bool, error) {

// Don't do the request if the client is nil.
if o.client == nil {
Expand All @@ -260,8 +260,7 @@ func (o *remoteJWTChecker) jwtRequest(host, uri, token string, dataMap map[strin
tlsStr = "https://"
}

var err error
host, err = o.getHost(token)
host, err := o.getHost(token)
if err != nil {
return false, err
}
Expand Down

0 comments on commit 55321df

Please sign in to comment.