hooks

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 20, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AfterAppCreateHook

type AfterAppCreateHook func(ctx context.Context, app interface{}) error

type AfterMemberAddHook

type AfterMemberAddHook func(ctx context.Context, member interface{}) error

type AfterOrganizationCreateHook

type AfterOrganizationCreateHook func(ctx context.Context, org interface{}) error

type AfterSessionCreateHook

type AfterSessionCreateHook func(ctx context.Context, session *session.Session) error

type AfterSessionRevokeHook

type AfterSessionRevokeHook func(ctx context.Context, sessionID xid.ID) error

type AfterSignInHook

type AfterSignInHook func(ctx context.Context, response *responses.AuthResponse) error

type AfterSignOutHook

type AfterSignOutHook func(ctx context.Context, token string) error

type AfterSignUpHook

type AfterSignUpHook func(ctx context.Context, response *responses.AuthResponse) error

type AfterUserCreateHook

type AfterUserCreateHook func(ctx context.Context, user *user.User) error

type AfterUserDeleteHook

type AfterUserDeleteHook func(ctx context.Context, userID xid.ID) error

type AfterUserUpdateHook

type AfterUserUpdateHook func(ctx context.Context, user *user.User) error

type BeforeAppCreateHook

type BeforeAppCreateHook func(ctx context.Context, req interface{}) error

App hooks (for multi-app support)

type BeforeMemberAddHook

type BeforeMemberAddHook func(ctx context.Context, orgID string, userID xid.ID) error

type BeforeOrganizationCreateHook

type BeforeOrganizationCreateHook func(ctx context.Context, req interface{}) error

Organization hooks (for multi-tenancy plugin)

type BeforeSessionCreateHook

type BeforeSessionCreateHook func(ctx context.Context, req *session.CreateSessionRequest) error

Session hooks

type BeforeSessionRevokeHook

type BeforeSessionRevokeHook func(ctx context.Context, token string) error

type BeforeSignInHook

type BeforeSignInHook func(ctx context.Context, req *auth.SignInRequest) error

type BeforeSignOutHook

type BeforeSignOutHook func(ctx context.Context, token string) error

type BeforeSignUpHook

type BeforeSignUpHook func(ctx context.Context, req *auth.SignUpRequest) error

Auth hooks

type BeforeUserCreateHook

type BeforeUserCreateHook func(ctx context.Context, req *user.CreateUserRequest) error

User hooks

type BeforeUserDeleteHook

type BeforeUserDeleteHook func(ctx context.Context, userID xid.ID) error

type BeforeUserUpdateHook

type BeforeUserUpdateHook func(ctx context.Context, userID xid.ID, req *user.UpdateUserRequest) error

type HookRegistry

type HookRegistry struct {
	// contains filtered or unexported fields
}

HookRegistry manages all hooks for the authentication system

func NewHookRegistry

func NewHookRegistry() *HookRegistry

NewHookRegistry creates a new hook registry

func (*HookRegistry) ExecuteAfterAppCreate

func (h *HookRegistry) ExecuteAfterAppCreate(ctx context.Context, app interface{}) error

ExecuteAfterAppCreate executes all after app create hooks

func (*HookRegistry) ExecuteAfterMemberAdd

func (h *HookRegistry) ExecuteAfterMemberAdd(ctx context.Context, member interface{}) error

ExecuteAfterMemberAdd executes all after member add hooks

func (*HookRegistry) ExecuteAfterOrganizationCreate

func (h *HookRegistry) ExecuteAfterOrganizationCreate(ctx context.Context, org interface{}) error

ExecuteAfterOrganizationCreate executes all after organization create hooks

func (*HookRegistry) ExecuteAfterSessionCreate

func (h *HookRegistry) ExecuteAfterSessionCreate(ctx context.Context, session *session.Session) error

ExecuteAfterSessionCreate executes all after session create hooks

func (*HookRegistry) ExecuteAfterSessionRevoke

func (h *HookRegistry) ExecuteAfterSessionRevoke(ctx context.Context, sessionID xid.ID) error

ExecuteAfterSessionRevoke executes all after session revoke hooks

func (*HookRegistry) ExecuteAfterSignIn

func (h *HookRegistry) ExecuteAfterSignIn(ctx context.Context, response *responses.AuthResponse) error

ExecuteAfterSignIn executes all after sign in hooks

func (*HookRegistry) ExecuteAfterSignOut

func (h *HookRegistry) ExecuteAfterSignOut(ctx context.Context, token string) error

ExecuteAfterSignOut executes all after sign out hooks

func (*HookRegistry) ExecuteAfterSignUp

func (h *HookRegistry) ExecuteAfterSignUp(ctx context.Context, response *responses.AuthResponse) error

ExecuteAfterSignUp executes all after sign up hooks

func (*HookRegistry) ExecuteAfterUserCreate

func (h *HookRegistry) ExecuteAfterUserCreate(ctx context.Context, user *user.User) error

ExecuteAfterUserCreate executes all after user create hooks

func (*HookRegistry) ExecuteAfterUserDelete

func (h *HookRegistry) ExecuteAfterUserDelete(ctx context.Context, userID xid.ID) error

ExecuteAfterUserDelete executes all after user delete hooks

func (*HookRegistry) ExecuteAfterUserUpdate

func (h *HookRegistry) ExecuteAfterUserUpdate(ctx context.Context, user *user.User) error

ExecuteAfterUserUpdate executes all after user update hooks

func (*HookRegistry) ExecuteBeforeAppCreate

func (h *HookRegistry) ExecuteBeforeAppCreate(ctx context.Context, req interface{}) error

ExecuteBeforeAppCreate executes all before app create hooks

func (*HookRegistry) ExecuteBeforeMemberAdd

func (h *HookRegistry) ExecuteBeforeMemberAdd(ctx context.Context, orgID string, userID xid.ID) error

ExecuteBeforeMemberAdd executes all before member add hooks

func (*HookRegistry) ExecuteBeforeOrganizationCreate

func (h *HookRegistry) ExecuteBeforeOrganizationCreate(ctx context.Context, req interface{}) error

ExecuteBeforeOrganizationCreate executes all before organization create hooks

func (*HookRegistry) ExecuteBeforeSessionCreate

func (h *HookRegistry) ExecuteBeforeSessionCreate(ctx context.Context, req *session.CreateSessionRequest) error

ExecuteBeforeSessionCreate executes all before session create hooks

func (*HookRegistry) ExecuteBeforeSessionRevoke

func (h *HookRegistry) ExecuteBeforeSessionRevoke(ctx context.Context, token string) error

ExecuteBeforeSessionRevoke executes all before session revoke hooks

func (*HookRegistry) ExecuteBeforeSignIn

func (h *HookRegistry) ExecuteBeforeSignIn(ctx context.Context, req *auth.SignInRequest) error

ExecuteBeforeSignIn executes all before sign in hooks

func (*HookRegistry) ExecuteBeforeSignOut

func (h *HookRegistry) ExecuteBeforeSignOut(ctx context.Context, token string) error

ExecuteBeforeSignOut executes all before sign out hooks

func (*HookRegistry) ExecuteBeforeSignUp

func (h *HookRegistry) ExecuteBeforeSignUp(ctx context.Context, req *auth.SignUpRequest) error

ExecuteBeforeSignUp executes all before sign up hooks

func (*HookRegistry) ExecuteBeforeUserCreate

func (h *HookRegistry) ExecuteBeforeUserCreate(ctx context.Context, req *user.CreateUserRequest) error

ExecuteBeforeUserCreate executes all before user create hooks

func (*HookRegistry) ExecuteBeforeUserDelete

func (h *HookRegistry) ExecuteBeforeUserDelete(ctx context.Context, userID xid.ID) error

ExecuteBeforeUserDelete executes all before user delete hooks

func (*HookRegistry) ExecuteBeforeUserUpdate

func (h *HookRegistry) ExecuteBeforeUserUpdate(ctx context.Context, userID xid.ID, req *user.UpdateUserRequest) error

ExecuteBeforeUserUpdate executes all before user update hooks

func (*HookRegistry) RegisterAfterAppCreate

func (h *HookRegistry) RegisterAfterAppCreate(hook AfterAppCreateHook)

func (*HookRegistry) RegisterAfterMemberAdd

func (h *HookRegistry) RegisterAfterMemberAdd(hook AfterMemberAddHook)

func (*HookRegistry) RegisterAfterOrganizationCreate

func (h *HookRegistry) RegisterAfterOrganizationCreate(hook AfterOrganizationCreateHook)

func (*HookRegistry) RegisterAfterSessionCreate

func (h *HookRegistry) RegisterAfterSessionCreate(hook AfterSessionCreateHook)

func (*HookRegistry) RegisterAfterSessionRevoke

func (h *HookRegistry) RegisterAfterSessionRevoke(hook AfterSessionRevokeHook)

func (*HookRegistry) RegisterAfterSignIn

func (h *HookRegistry) RegisterAfterSignIn(hook AfterSignInHook)

func (*HookRegistry) RegisterAfterSignOut

func (h *HookRegistry) RegisterAfterSignOut(hook AfterSignOutHook)

func (*HookRegistry) RegisterAfterSignUp

func (h *HookRegistry) RegisterAfterSignUp(hook AfterSignUpHook)

func (*HookRegistry) RegisterAfterUserCreate

func (h *HookRegistry) RegisterAfterUserCreate(hook AfterUserCreateHook)

func (*HookRegistry) RegisterAfterUserDelete

func (h *HookRegistry) RegisterAfterUserDelete(hook AfterUserDeleteHook)

func (*HookRegistry) RegisterAfterUserUpdate

func (h *HookRegistry) RegisterAfterUserUpdate(hook AfterUserUpdateHook)

func (*HookRegistry) RegisterBeforeAppCreate

func (h *HookRegistry) RegisterBeforeAppCreate(hook BeforeAppCreateHook)

App hook registration methods (for multi-app support)

func (*HookRegistry) RegisterBeforeMemberAdd

func (h *HookRegistry) RegisterBeforeMemberAdd(hook BeforeMemberAddHook)

func (*HookRegistry) RegisterBeforeOrganizationCreate

func (h *HookRegistry) RegisterBeforeOrganizationCreate(hook BeforeOrganizationCreateHook)

Organization hook registration methods (for multi-tenancy plugin)

func (*HookRegistry) RegisterBeforeSessionCreate

func (h *HookRegistry) RegisterBeforeSessionCreate(hook BeforeSessionCreateHook)

Session hook registration methods

func (*HookRegistry) RegisterBeforeSessionRevoke

func (h *HookRegistry) RegisterBeforeSessionRevoke(hook BeforeSessionRevokeHook)

func (*HookRegistry) RegisterBeforeSignIn

func (h *HookRegistry) RegisterBeforeSignIn(hook BeforeSignInHook)

func (*HookRegistry) RegisterBeforeSignOut

func (h *HookRegistry) RegisterBeforeSignOut(hook BeforeSignOutHook)

func (*HookRegistry) RegisterBeforeSignUp

func (h *HookRegistry) RegisterBeforeSignUp(hook BeforeSignUpHook)

Auth hook registration methods

func (*HookRegistry) RegisterBeforeUserCreate

func (h *HookRegistry) RegisterBeforeUserCreate(hook BeforeUserCreateHook)

User hook registration methods

func (*HookRegistry) RegisterBeforeUserDelete

func (h *HookRegistry) RegisterBeforeUserDelete(hook BeforeUserDeleteHook)

func (*HookRegistry) RegisterBeforeUserUpdate

func (h *HookRegistry) RegisterBeforeUserUpdate(hook BeforeUserUpdateHook)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL