allow running auth-bearer as part of the runtime

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
This commit is contained in:
Jörn Friedrich Dreyer
2025-09-22 16:43:05 +02:00
parent cd33119f65
commit 185d319c6a
2 changed files with 7 additions and 1 deletions

View File

@@ -28,6 +28,7 @@ import (
audit "github.com/opencloud-eu/opencloud/services/audit/pkg/command"
authapp "github.com/opencloud-eu/opencloud/services/auth-app/pkg/command"
authbasic "github.com/opencloud-eu/opencloud/services/auth-basic/pkg/command"
authbearer "github.com/opencloud-eu/opencloud/services/auth-bearer/pkg/command"
authmachine "github.com/opencloud-eu/opencloud/services/auth-machine/pkg/command"
authservice "github.com/opencloud-eu/opencloud/services/auth-service/pkg/command"
clientlog "github.com/opencloud-eu/opencloud/services/clientlog/pkg/command"
@@ -329,6 +330,11 @@ func NewService(ctx context.Context, options ...Option) (*Service, error) {
cfg.Audit.Commons = cfg.Commons
return audit.Execute(cfg.Audit)
})
areg(opts.Config.AuthBearer.Service.Name, func(ctx context.Context, cfg *occfg.Config) error {
cfg.AuthBearer.Context = ctx
cfg.AuthBearer.Commons = cfg.Commons
return authbearer.Execute(cfg.AuthBearer)
})
areg(opts.Config.Policies.Service.Name, func(ctx context.Context, cfg *occfg.Config) error {
cfg.Policies.Context = ctx
cfg.Policies.Commons = cfg.Commons

View File

@@ -70,7 +70,7 @@ func Server(cfg *config.Config) *cli.Command {
debug.Config(cfg),
)
if err != nil {
logger.Info().Err(err).Str("server", "debug").Msg("Failed to initialize server")
logger.Error().Err(err).Str("server", "debug").Msg("Failed to initialize server")
return err
}