This commit is contained in:
mr
2024-11-08 14:00:34 +01:00
parent c73bd264cb
commit f4154136e1
3 changed files with 5 additions and 3 deletions

View File

@@ -182,10 +182,10 @@ func (a HydraConnector) Login(username string, cookies ...*http.Cookie) (t *Toke
}
now := time.Now().UTC()
now = now.Add(time.Duration(token.ExpiresIn) * time.Second)
token.ExpiresIn = now.Unix()
unix := now.Unix()
c := claims.GetClaims().AddClaimsToToken(username, pp.Data[0].(*peer.Peer).Url)
c.Session.AccessToken["exp"] = token.ExpiresIn
c.Session.AccessToken["exp"] = unix
b, _ = json.Marshal(c)