Increment refresh counter

This commit is contained in:
Dino Omanovic
2017-05-30 17:17:57 +02:00
parent 1c5b6067b1
commit d50c3cdd68
+1
View File
@@ -186,6 +186,7 @@ func (h *Handler) handleRefresh(w http.ResponseWriter, r *http.Request, userInfo
if userInfo.Refreshes >= h.config.JwtRefreshes {
h.respondMaxRefreshesReached(w, r)
} else {
userInfo.Refreshes++
h.respondAuthenticated(w, r, userInfo)
logging.Application(r.Header).WithField("username", userInfo.Sub).Info("refreshed jwt")
}