mirror of
https://github.com/pocket-id/pocket-id.git
synced 2026-10-14 13:49:03 +02:00
feat: add OIDC back-channel logout (#1734)
Co-authored-by: Alessandro (Ale) Segala <43508+ItalyPaleAle@users.noreply.github.com> Co-authored-by: Elias Schneider <login@eliasschneider.com>
This commit is contained in:
co-authored by
Alessandro Segala
Elias Schneider
parent
23c4825abd
commit
2075de3234
@@ -10,6 +10,7 @@ import (
|
||||
"github.com/pocket-id/pocket-id/backend/internal/apikey"
|
||||
"github.com/pocket-id/pocket-id/backend/internal/appconfig"
|
||||
"github.com/pocket-id/pocket-id/backend/internal/auditlogs"
|
||||
"github.com/pocket-id/pocket-id/backend/internal/backchannellogout"
|
||||
"github.com/pocket-id/pocket-id/backend/internal/common"
|
||||
"github.com/pocket-id/pocket-id/backend/internal/devicelogin"
|
||||
"github.com/pocket-id/pocket-id/backend/internal/email"
|
||||
@@ -174,23 +175,29 @@ func initServices(
|
||||
return nil, fmt.Errorf("failed to create OIDC module: %w", err)
|
||||
}
|
||||
|
||||
svc.oidcService, err = service.NewOidcService(db, svc.jwtService, svc.oidcModule.Preview, svc.oidcModule, svc.scimSyncModule, httpClient, fileStorage)
|
||||
backchannelLogoutService, err := backchannellogout.NewService(db, svc.jwtService, httpClient, actors)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to create back-channel logout service: %w", err)
|
||||
}
|
||||
|
||||
svc.oidcService, err = service.NewOidcService(db, svc.jwtService, svc.oidcModule.Preview, svc.oidcModule, svc.scimSyncModule, backchannelLogoutService, httpClient, fileStorage)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to create OIDC service: %w", err)
|
||||
}
|
||||
|
||||
svc.userGroupService = service.NewUserGroupService(db, svc.scimSyncModule)
|
||||
svc.userService = service.NewUserService(db, svc.jwtService, svc.auditLogService, svc.customClaimService, svc.appImagesService, svc.scimSyncModule, fileStorage)
|
||||
svc.userGroupService = service.NewUserGroupService(db, svc.scimSyncModule, backchannelLogoutService)
|
||||
svc.userService = service.NewUserService(db, svc.jwtService, svc.auditLogService, svc.customClaimService, svc.appImagesService, svc.scimSyncModule, backchannelLogoutService, fileStorage)
|
||||
|
||||
svc.ldapSyncModule, err = ldapsync.New(ldapsync.Dependencies{
|
||||
DB: db,
|
||||
Actors: actors,
|
||||
HTTPClient: httpClient,
|
||||
FileStorage: fileStorage,
|
||||
Users: svc.userService,
|
||||
Groups: svc.userGroupService,
|
||||
AppConfig: svc.appConfigService,
|
||||
ScimSync: svc.scimSyncModule,
|
||||
DB: db,
|
||||
Actors: actors,
|
||||
HTTPClient: httpClient,
|
||||
FileStorage: fileStorage,
|
||||
Users: svc.userService,
|
||||
Groups: svc.userGroupService,
|
||||
AppConfig: svc.appConfigService,
|
||||
ScimSync: svc.scimSyncModule,
|
||||
BackchannelLogout: backchannelLogoutService,
|
||||
// Disable in test environment
|
||||
ScheduleDisabled: common.EnvConfig.AppEnv.IsTest(),
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user