Merge pull request #15075 from influxdata/fix_http_endpoint

fix(notification/endpoint): http bearer token
pull/15078/head
kelwang 2019-09-09 16:43:03 -04:00 committed by GitHub
commit 3c87dc027f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -111,7 +111,7 @@ func (s HTTP) Valid() error {
Msg: "invalid http username/password for basic auth", Msg: "invalid http username/password for basic auth",
} }
} }
if s.AuthMethod == "bearer" && s.Token.Key != httpTokenSuffix { if s.AuthMethod == "bearer" && s.Token.Key != s.ID.String()+httpTokenSuffix {
return &influxdb.Error{ return &influxdb.Error{
Code: influxdb.EInvalid, Code: influxdb.EInvalid,
Msg: "invalid http token for bearer auth", Msg: "invalid http token for bearer auth",