Auth: Introduce pre-logout hooks + add GCOM LogoutHook (#88475)

* Introduce preLogoutHooks in authn service

* Add gcom_logout_hook

* Config the api token from the Grafana config file

* Simplify

* Add tests for logout hook

* Clean up

* Update

* Address PR comment

* Fix
This commit is contained in:
Misi
2024-05-30 15:52:16 +02:00
committed by GitHub
parent de201c5cdd
commit ed6b3e9e7c
11 changed files with 161 additions and 2 deletions
@@ -561,6 +561,7 @@ func setupTests(t *testing.T, opts ...func(svc *Service)) *Service {
metrics: newMetrics(nil),
postAuthHooks: newQueue[authn.PostAuthHookFn](),
postLoginHooks: newQueue[authn.PostLoginHookFn](),
preLogoutHooks: newQueue[authn.PreLogoutHookFn](),
}
for _, o := range opts {