add groups in claims

This commit is contained in:
mr
2024-11-27 12:36:37 +01:00
parent 1722980514
commit fd65220b91
3 changed files with 17 additions and 5 deletions

View File

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