auth: int for refresh token as well

pull/163/head v0.3.8
Harvey Tindall 3 years ago
parent 626d623841
commit 5b319d6612
No known key found for this signature in database
GPG Key ID: BBC65952848FB1A2

@ -4,7 +4,6 @@ import (
"encoding/base64"
"fmt"
"os"
"strconv"
"strings"
"time"
@ -199,7 +198,7 @@ func (app *appContext) getTokenRefresh(gc *gin.Context) {
return
}
claims, ok := token.Claims.(jwt.MapClaims)
expiryUnix, err := strconv.ParseInt(claims["exp"].(string), 10, 64)
expiryUnix := int64(claims["exp"].(float64))
if err != nil {
app.debug.Printf("getTokenRefresh: Invalid token expiry: %s", err)
respond(401, "Invalid token", gc)

Loading…
Cancel
Save