Skip to content

Commit

Permalink
fix: type-assert all interfaces that WebHook implements
Browse files Browse the repository at this point in the history
  • Loading branch information
alnr committed Jul 19, 2023
1 parent 3d6927c commit ffda1a0
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions selfservice/hook/web_hook.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,17 +38,24 @@ import (
"github.com/ory/kratos/x"
)

var (
_ registration.PostHookPostPersistExecutor = new(WebHook)
_ registration.PostHookPrePersistExecutor = new(WebHook)
var _ interface {
login.PreHookExecutor
login.PostHookExecutor

_ verification.PostHookExecutor = new(WebHook)
registration.PostHookPostPersistExecutor
registration.PostHookPrePersistExecutor
registration.PreHookExecutor

_ recovery.PostHookExecutor = new(WebHook)
verification.PreHookExecutor
verification.PostHookExecutor

_ settings.PostHookPostPersistExecutor = new(WebHook)
_ settings.PostHookPrePersistExecutor = new(WebHook)
)
recovery.PreHookExecutor
recovery.PostHookExecutor

settings.PreHookExecutor
settings.PostHookPrePersistExecutor
settings.PostHookPostPersistExecutor
} = (*WebHook)(nil)

type (
webHookDependencies interface {
Expand Down

0 comments on commit ffda1a0

Please sign in to comment.