mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-09-14 23:00:31 -04:00
Request revatoken via machine auth after autoprovsioning user (#4690)
To successfully authenticate a user after it was autoprovisioned, we need to get a valid reva token. Fixes: #4616
This commit is contained in:
1 parent
5eaf0dfe7b
commit
e4c28def8a
2 files changed
+10
No files matched your search
@@ -0,0 +1,6 @@
|
||||
Bugfix: Fix authentication for autoprovisioned users
|
||||
|
||||
We've fixed an issue in the proxy, which made the first http request of an
|
||||
autoprovisioned user fail.
|
||||
|
||||
https://github.com/owncloud/ocis/issues/4616
|
||||
@@ -76,6 +76,10 @@ func (m accountResolver) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
||||
if err != nil {
|
||||
m.logger.Error().Err(err).Msg("Autoprovisioning user failed")
|
||||
}
|
||||
user, token, err = m.userProvider.GetUserByClaims(req.Context(), "userid", user.Id.OpaqueId, true)
|
||||
if err != nil {
|
||||
m.logger.Error().Err(err).Str("userid", user.Id.OpaqueId).Msg("Error getting token for autoprovisioned user")
|
||||
}
|
||||
}
|
||||
|
||||
if errors.Is(err, backend.ErrAccountDisabled) {
|
||||
|
||||
Reference in new issue
Block a user