diff options
| author | Paul Buetow <paul@buetow.org> | 2026-05-17 21:31:20 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-05-17 21:31:20 +0300 |
| commit | e8bdc1d09837d2bb0d1daec11af63da9d27fab43 (patch) | |
| tree | cc34ad1f3bb538a93e318e18968d63fdc2857b40 /player-server/cmd | |
| parent | a44aab26ae83d35d7bf83a4531c6c7fa77702b0d (diff) | |
Add Bearer token authentication alongside session cookies
Diffstat (limited to 'player-server/cmd')
| -rw-r--r-- | player-server/cmd/player/main.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/player-server/cmd/player/main.go b/player-server/cmd/player/main.go index 771664f..04fdc14 100644 --- a/player-server/cmd/player/main.go +++ b/player-server/cmd/player/main.go @@ -92,6 +92,7 @@ func wireDeps(cfg *internal.Config, store repository.Store, logger *slog.Logger, clk := clock.RealClock{} hasher := auth.NewBCryptHasher(12) sm := auth.NewSessionManager(store, clk, time.Duration(cfg.SessionTimeoutHours)*time.Hour) + tm := auth.NewTokenManager() prober := probe.NewFFProber() thumbGen := thumb.NewFFmpegGenerator() @@ -104,7 +105,7 @@ func wireDeps(cfg *internal.Config, store repository.Store, logger *slog.Logger, adminSvc := service.NewAdminServiceWithLogger(store, clk, hasher, fsScanner, cfg.MediaRoot, appCtx, logger) progressSvc := service.NewProgressService(store, clk) - authSvc := service.NewAuthService(store, clk, hasher, sm) + authSvc := service.NewAuthService(store, clk, hasher, sm, tm) podcastSvc := service.NewPodcastServiceWithLogger(store, clk, cfg.MediaRoot, helper, prober, thumbGen, &http.Client{Timeout: service.DefaultHTTPClientTimeout}, cfg.PodcastCheckMinutes, logger) |
