Add more logging for auth
This commit is contained in:
parent
cb98c766da
commit
ae7a82ed7b
|
|
@ -257,11 +257,13 @@ func (h *microsubHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||||
var token TokenResponse
|
var token TokenResponse
|
||||||
|
|
||||||
if !h.cachedCheckAuthToken(authorization, &token) {
|
if !h.cachedCheckAuthToken(authorization, &token) {
|
||||||
|
log.Printf("Token could not be validated")
|
||||||
http.Error(w, "Can't validate token", 403)
|
http.Error(w, "Can't validate token", 403)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if token.Me != "https://publog.stuifzandapp.com/" {
|
if token.Me != "https://publog.stuifzandapp.com/" {
|
||||||
|
log.Printf("Missing \"me\" in token response: %#v\n", token)
|
||||||
http.Error(w, "Wrong me", 403)
|
http.Error(w, "Wrong me", 403)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user