diff --git a/handlers/login.go b/handlers/login.go index de85270..0d6ae45 100644 --- a/handlers/login.go +++ b/handlers/login.go @@ -215,7 +215,13 @@ func (aH *AccessHandler) Me(c *gin.Context) { return } - claims := token.Claims.(jwt.MapClaims) + claims, ok := token.Claims.(jwt.MapClaims) + if !ok { + aH.logger.Error("Me", "error: token.Claims.(jwt.MapClaims)") + c.JSON(http.StatusInternalServerError, nil) + return + } + c.JSON(http.StatusOK, gin.H{ "id": claims["id"], "user": claims["username"],