mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-10-27 08:39:12 -04:00
Merge pull request #3286 from fschade/fix-proxy-middleware-race
Fix proxy middleware race
This commit is contained in:
1 file changed
+8
-6
@@ -104,13 +104,15 @@ func (m *OIDCAuthenticator) getClaims(token string, req *http.Request) (map[stri
|
||||
expiration := m.extractExpiration(aClaims)
|
||||
// always set an exp claim
|
||||
claims["exp"] = expiration.Unix()
|
||||
go func() {
|
||||
d, err := msgpack.Marshal(claims)
|
||||
if err != nil {
|
||||
m.Logger.Error().Err(err).Msg("failed to marshal claims for userinfo cache")
|
||||
return
|
||||
}
|
||||
|
||||
d, err := msgpack.Marshal(claims)
|
||||
if err != nil {
|
||||
m.Logger.Error().Err(err).Msg("failed to marshal claims for userinfo cache")
|
||||
|
||||
return claims, true, nil
|
||||
}
|
||||
|
||||
go func() {
|
||||
err = m.userInfoCache.Write(&store.Record{
|
||||
Key: encodedHash,
|
||||
Value: d,
|
||||
|
||||
Reference in new issue
Block a user