Implement owner setup and browser authentication sessions
This commit is contained in:
parent
077cf7601a
commit
715423ab8e
21 changed files with 2185 additions and 14 deletions
|
|
@ -10,6 +10,7 @@ import (
|
|||
"syscall"
|
||||
"time"
|
||||
|
||||
"drive.local/drivev2/internal/adapters/authn"
|
||||
"drive.local/drivev2/internal/adapters/postgres"
|
||||
"drive.local/drivev2/internal/adapters/webassets"
|
||||
"drive.local/drivev2/internal/application"
|
||||
|
|
@ -67,7 +68,13 @@ func serve() error {
|
|||
defer store.Close()
|
||||
|
||||
systemService := application.NewSystemService(store, version)
|
||||
server := httpapi.NewServer(cfg, logger, systemService, webassets.New(cfg.WebRoot))
|
||||
authenticationService := application.NewAuthenticationService(
|
||||
store,
|
||||
authn.NewPasswordHasher(),
|
||||
authn.CredentialGenerator{},
|
||||
authn.SystemClock{},
|
||||
)
|
||||
server := httpapi.NewServer(cfg, logger, systemService, authenticationService, webassets.New(cfg.WebRoot))
|
||||
ctx, stop := signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM)
|
||||
defer stop()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue