mirror of
https://github.com/tulir/mautrix-whatsapp
synced 2024-06-09 14:38:53 +02:00
provisioning: better logging around authentication
This commit is contained in:
parent
7edd9f3237
commit
2a44a2bf7d
|
@ -111,8 +111,9 @@ func (prov *ProvisioningAPI) AuthMiddleware(h http.Handler) http.Handler {
|
||||||
auth = auth[len("Bearer "):]
|
auth = auth[len("Bearer "):]
|
||||||
}
|
}
|
||||||
if auth != prov.bridge.Config.Bridge.Provisioning.SharedSecret {
|
if auth != prov.bridge.Config.Bridge.Provisioning.SharedSecret {
|
||||||
|
prov.log.Infof("Authentication token does not match shared secret")
|
||||||
jsonResponse(w, http.StatusForbidden, map[string]interface{}{
|
jsonResponse(w, http.StatusForbidden, map[string]interface{}{
|
||||||
"error": "Invalid auth token",
|
"error": "Authentication token does not match shared secret",
|
||||||
"errcode": "M_FORBIDDEN",
|
"errcode": "M_FORBIDDEN",
|
||||||
})
|
})
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in a new issue