mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-05-24 08:27:27 -04:00
appauth: Add token and user (with roles) to context
When successfully authenticating a user via apptoken, resolve the user's roles and add the user and the token returned by the auth service to the request context. Rely on the account_resolve middleware to add the reva token to the outgoing request as the other auth middlewares do.
This commit is contained in:
@@ -294,6 +294,7 @@ func loadMiddlewares(logger log.Logger, cfg *config.Config,
|
||||
authenticators = append(authenticators, middleware.AppAuthAuthenticator{
|
||||
Logger: logger,
|
||||
RevaGatewaySelector: gatewaySelector,
|
||||
UserRoleAssigner: roleAssigner,
|
||||
})
|
||||
}
|
||||
authenticators = append(authenticators, middleware.NewOIDCAuthenticator(
|
||||
|
||||
Reference in New Issue
Block a user