proxy: Move CS3 User backend options to "functional" options
This will make it easier to add/remove options to the backend in the future.
This commit is contained in:
committed by
Ralf Haferkamp
parent
88e8bb1b72
commit
490a835a3a
@@ -147,7 +147,14 @@ func loadMiddlewares(ctx context.Context, logger log.Logger, cfg *config.Config)
|
||||
Msg("Failed to create token manager")
|
||||
}
|
||||
|
||||
userProvider = backend.NewCS3UserBackend(rolesClient, revaClient, cfg.MachineAuthAPIKey, cfg.OIDC.Issuer, tokenManager, logger)
|
||||
userProvider = backend.NewCS3UserBackend(
|
||||
backend.WithLogger(logger),
|
||||
backend.WithRoleService(rolesClient),
|
||||
backend.WithRevaAuthenticator(revaClient),
|
||||
backend.WithMachineAuthAPIKey(cfg.MachineAuthAPIKey),
|
||||
backend.WithOIDCissuer(cfg.OIDC.Issuer),
|
||||
backend.WithTokenManager(tokenManager),
|
||||
)
|
||||
default:
|
||||
logger.Fatal().Msgf("Invalid accounts backend type '%s'", cfg.AccountBackend)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user