mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2025-12-31 17:30:29 -06: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:
6
changelog/unreleased/fix-autoprovison-token.md
Normal file
6
changelog/unreleased/fix-autoprovison-token.md
Normal file
@@ -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