AuthN: Add last seen sync hooks for user and api keys (#61571)

* AUthN: Add last seen sync hooks for user / service account and move api
key last seen to own hook

* ContextHandler: only run sync for last seen if auth.Service is not
enabled
This commit is contained in:
Karl Persson
2023-01-17 13:50:58 +01:00
committed by GitHub
parent ac25913f53
commit 766fa4e7d5
5 changed files with 98 additions and 16 deletions
+2
View File
@@ -108,6 +108,8 @@ func ProvideService(
orgUserSyncService := sync.ProvideOrgSync(userService, orgService, accessControlService)
s.RegisterPostAuthHook(userSyncService.SyncUser)
s.RegisterPostAuthHook(orgUserSyncService.SyncOrgUser)
s.RegisterPostAuthHook(sync.ProvideUserLastSeenSync(userService).SyncLastSeen)
s.RegisterPostAuthHook(sync.ProvideAPIKeyLastSeenSync(apikeyService).SyncLastSeen)
return s
}