Documentation
¶
Index ¶
- type AfterAppCreateHook
- type AfterMemberAddHook
- type AfterMemberRemoveHook
- type AfterMemberRoleChangeHook
- type AfterOrganizationCreateHook
- type AfterOrganizationDeleteHook
- type AfterOrganizationUpdateHook
- type AfterPermissionEvaluateHook
- type AfterSessionCreateHook
- type AfterSessionRevokeHook
- type AfterSignInHook
- type AfterSignOutHook
- type AfterSignUpHook
- type AfterUserCreateHook
- type AfterUserDeleteHook
- type AfterUserUpdateHook
- type BeforeAppCreateHook
- type BeforeMemberAddHook
- type BeforeOrganizationCreateHook
- type BeforePermissionEvaluateHook
- type BeforeSessionCreateHook
- type BeforeSessionRevokeHook
- type BeforeSignInHook
- type BeforeSignOutHook
- type BeforeSignUpHook
- type BeforeUserCreateHook
- type BeforeUserDeleteHook
- type BeforeUserUpdateHook
- type HookRegistry
- func (h *HookRegistry) DisableDebug()
- func (h *HookRegistry) EnableDebug()
- func (h *HookRegistry) ExecuteAfterAppCreate(ctx context.Context, app interface{}) error
- func (h *HookRegistry) ExecuteAfterMemberAdd(ctx context.Context, member interface{}) error
- func (h *HookRegistry) ExecuteAfterMemberRemove(ctx context.Context, orgID xid.ID, userID xid.ID, memberName string) error
- func (h *HookRegistry) ExecuteAfterMemberRoleChange(ctx context.Context, orgID xid.ID, userID xid.ID, oldRole string, ...) error
- func (h *HookRegistry) ExecuteAfterOrganizationCreate(ctx context.Context, org interface{}) error
- func (h *HookRegistry) ExecuteAfterOrganizationDelete(ctx context.Context, orgID xid.ID, orgName string) error
- func (h *HookRegistry) ExecuteAfterOrganizationUpdate(ctx context.Context, org interface{}) error
- func (h *HookRegistry) ExecuteAfterPermissionEvaluate(ctx context.Context, req *PermissionEvaluateRequest, ...) error
- func (h *HookRegistry) ExecuteAfterSessionCreate(ctx context.Context, session *session.Session) error
- func (h *HookRegistry) ExecuteAfterSessionRevoke(ctx context.Context, sessionID xid.ID) error
- func (h *HookRegistry) ExecuteAfterSignIn(ctx context.Context, response *responses.AuthResponse) error
- func (h *HookRegistry) ExecuteAfterSignOut(ctx context.Context, token string) error
- func (h *HookRegistry) ExecuteAfterSignUp(ctx context.Context, response *responses.AuthResponse) error
- func (h *HookRegistry) ExecuteAfterUserCreate(ctx context.Context, user *user.User) error
- func (h *HookRegistry) ExecuteAfterUserDelete(ctx context.Context, userID xid.ID) error
- func (h *HookRegistry) ExecuteAfterUserUpdate(ctx context.Context, user *user.User) error
- func (h *HookRegistry) ExecuteBeforeAppCreate(ctx context.Context, req interface{}) error
- func (h *HookRegistry) ExecuteBeforeMemberAdd(ctx context.Context, orgID string, userID xid.ID) error
- func (h *HookRegistry) ExecuteBeforeOrganizationCreate(ctx context.Context, req interface{}) error
- func (h *HookRegistry) ExecuteBeforePermissionEvaluate(ctx context.Context, req *PermissionEvaluateRequest) error
- func (h *HookRegistry) ExecuteBeforeSessionCreate(ctx context.Context, req *session.CreateSessionRequest) error
- func (h *HookRegistry) ExecuteBeforeSessionRevoke(ctx context.Context, token string) error
- func (h *HookRegistry) ExecuteBeforeSignIn(ctx context.Context, req *auth.SignInRequest) error
- func (h *HookRegistry) ExecuteBeforeSignOut(ctx context.Context, token string) error
- func (h *HookRegistry) ExecuteBeforeSignUp(ctx context.Context, req *auth.SignUpRequest) error
- func (h *HookRegistry) ExecuteBeforeUserCreate(ctx context.Context, req *user.CreateUserRequest) error
- func (h *HookRegistry) ExecuteBeforeUserDelete(ctx context.Context, userID xid.ID) error
- func (h *HookRegistry) ExecuteBeforeUserUpdate(ctx context.Context, userID xid.ID, req *user.UpdateUserRequest) error
- func (h *HookRegistry) ExecuteOnAccountDeleted(ctx context.Context, userID xid.ID) error
- func (h *HookRegistry) ExecuteOnAccountReactivated(ctx context.Context, userID xid.ID) error
- func (h *HookRegistry) ExecuteOnAccountSuspended(ctx context.Context, userID xid.ID, reason string) error
- func (h *HookRegistry) ExecuteOnAllSessionsRevoked(ctx context.Context, userID xid.ID) error
- func (h *HookRegistry) ExecuteOnCacheInvalidate(ctx context.Context, scope string, id xid.ID) error
- func (h *HookRegistry) ExecuteOnDeviceRemoved(ctx context.Context, userID xid.ID, deviceName string) error
- func (h *HookRegistry) ExecuteOnEmailChangeRequest(ctx context.Context, userID xid.ID, oldEmail, newEmail, confirmationUrl string) error
- func (h *HookRegistry) ExecuteOnEmailChanged(ctx context.Context, userID xid.ID, oldEmail, newEmail string) error
- func (h *HookRegistry) ExecuteOnNewDeviceDetected(ctx context.Context, userID xid.ID, deviceName, location, ipAddress string) error
- func (h *HookRegistry) ExecuteOnNewLocationDetected(ctx context.Context, userID xid.ID, location, ipAddress string) error
- func (h *HookRegistry) ExecuteOnPasswordChanged(ctx context.Context, userID xid.ID) error
- func (h *HookRegistry) ExecuteOnPolicyChange(ctx context.Context, policyID xid.ID, action string) error
- func (h *HookRegistry) ExecuteOnSuspiciousLoginDetected(ctx context.Context, userID xid.ID, reason, location, ipAddress string) error
- func (h *HookRegistry) ExecuteOnUsernameChanged(ctx context.Context, userID xid.ID, oldUsername, newUsername string) error
- func (h *HookRegistry) GetHookCounts() map[string]int
- func (h *HookRegistry) RegisterAfterAppCreate(hook AfterAppCreateHook)
- func (h *HookRegistry) RegisterAfterMemberAdd(hook AfterMemberAddHook)
- func (h *HookRegistry) RegisterAfterMemberRemove(hook AfterMemberRemoveHook)
- func (h *HookRegistry) RegisterAfterMemberRoleChange(hook AfterMemberRoleChangeHook)
- func (h *HookRegistry) RegisterAfterOrganizationCreate(hook AfterOrganizationCreateHook)
- func (h *HookRegistry) RegisterAfterOrganizationDelete(hook AfterOrganizationDeleteHook)
- func (h *HookRegistry) RegisterAfterOrganizationUpdate(hook AfterOrganizationUpdateHook)
- func (h *HookRegistry) RegisterAfterPermissionEvaluate(hook AfterPermissionEvaluateHook)
- func (h *HookRegistry) RegisterAfterSessionCreate(hook AfterSessionCreateHook)
- func (h *HookRegistry) RegisterAfterSessionRevoke(hook AfterSessionRevokeHook)
- func (h *HookRegistry) RegisterAfterSignIn(hook AfterSignInHook)
- func (h *HookRegistry) RegisterAfterSignOut(hook AfterSignOutHook)
- func (h *HookRegistry) RegisterAfterSignUp(hook AfterSignUpHook)
- func (h *HookRegistry) RegisterAfterUserCreate(hook AfterUserCreateHook)
- func (h *HookRegistry) RegisterAfterUserDelete(hook AfterUserDeleteHook)
- func (h *HookRegistry) RegisterAfterUserUpdate(hook AfterUserUpdateHook)
- func (h *HookRegistry) RegisterBeforeAppCreate(hook BeforeAppCreateHook)
- func (h *HookRegistry) RegisterBeforeMemberAdd(hook BeforeMemberAddHook)
- func (h *HookRegistry) RegisterBeforeOrganizationCreate(hook BeforeOrganizationCreateHook)
- func (h *HookRegistry) RegisterBeforePermissionEvaluate(hook BeforePermissionEvaluateHook)
- func (h *HookRegistry) RegisterBeforeSessionCreate(hook BeforeSessionCreateHook)
- func (h *HookRegistry) RegisterBeforeSessionRevoke(hook BeforeSessionRevokeHook)
- func (h *HookRegistry) RegisterBeforeSignIn(hook BeforeSignInHook)
- func (h *HookRegistry) RegisterBeforeSignOut(hook BeforeSignOutHook)
- func (h *HookRegistry) RegisterBeforeSignUp(hook BeforeSignUpHook)
- func (h *HookRegistry) RegisterBeforeUserCreate(hook BeforeUserCreateHook)
- func (h *HookRegistry) RegisterBeforeUserDelete(hook BeforeUserDeleteHook)
- func (h *HookRegistry) RegisterBeforeUserUpdate(hook BeforeUserUpdateHook)
- func (h *HookRegistry) RegisterOnAccountDeleted(hook OnAccountDeletedHook)
- func (h *HookRegistry) RegisterOnAccountReactivated(hook OnAccountReactivatedHook)
- func (h *HookRegistry) RegisterOnAccountSuspended(hook OnAccountSuspendedHook)
- func (h *HookRegistry) RegisterOnAllSessionsRevoked(hook OnAllSessionsRevokedHook)
- func (h *HookRegistry) RegisterOnCacheInvalidate(hook OnCacheInvalidateHook)
- func (h *HookRegistry) RegisterOnDeviceRemoved(hook OnDeviceRemovedHook)
- func (h *HookRegistry) RegisterOnEmailChangeRequest(hook OnEmailChangeRequestHook)
- func (h *HookRegistry) RegisterOnEmailChanged(hook OnEmailChangedHook)
- func (h *HookRegistry) RegisterOnNewDeviceDetected(hook OnNewDeviceDetectedHook)
- func (h *HookRegistry) RegisterOnNewLocationDetected(hook OnNewLocationDetectedHook)
- func (h *HookRegistry) RegisterOnPasswordChanged(hook OnPasswordChangedHook)
- func (h *HookRegistry) RegisterOnPolicyChange(hook OnPolicyChangeHook)
- func (h *HookRegistry) RegisterOnSuspiciousLoginDetected(hook OnSuspiciousLoginDetectedHook)
- func (h *HookRegistry) RegisterOnUsernameChanged(hook OnUsernameChangedHook)
- type OnAccountDeletedHook
- type OnAccountReactivatedHook
- type OnAccountSuspendedHook
- type OnAllSessionsRevokedHook
- type OnCacheInvalidateHook
- type OnDeviceRemovedHook
- type OnEmailChangeRequestHook
- type OnEmailChangedHook
- type OnNewDeviceDetectedHook
- type OnNewLocationDetectedHook
- type OnPasswordChangedHook
- type OnPolicyChangeHook
- type OnSuspiciousLoginDetectedHook
- type OnUsernameChangedHook
- type PermissionDecision
- type PermissionEvaluateRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AfterAppCreateHook ¶
type AfterMemberAddHook ¶
type AfterMemberRemoveHook ¶ added in v0.0.6
type AfterMemberRoleChangeHook ¶ added in v0.0.6
type AfterOrganizationDeleteHook ¶ added in v0.0.6
type AfterOrganizationUpdateHook ¶ added in v0.0.6
type AfterPermissionEvaluateHook ¶ added in v0.0.3
type AfterPermissionEvaluateHook func(ctx context.Context, req *PermissionEvaluateRequest, decision *PermissionDecision) error
type AfterSessionCreateHook ¶
type AfterSessionRevokeHook ¶
type AfterSignInHook ¶
type AfterSignInHook func(ctx context.Context, response *responses.AuthResponse) error
type AfterSignUpHook ¶
type AfterSignUpHook func(ctx context.Context, response *responses.AuthResponse) error
type AfterUserCreateHook ¶
type AfterUserUpdateHook ¶
type BeforeAppCreateHook ¶
App hooks (for multi-app support)
type BeforeMemberAddHook ¶
type BeforeOrganizationCreateHook ¶
Organization hooks (for multi-tenancy plugin)
type BeforePermissionEvaluateHook ¶ added in v0.0.3
type BeforePermissionEvaluateHook func(ctx context.Context, req *PermissionEvaluateRequest) error
type BeforeSessionCreateHook ¶
type BeforeSessionCreateHook func(ctx context.Context, req *session.CreateSessionRequest) error
Session hooks
type BeforeSessionRevokeHook ¶
type BeforeSignInHook ¶
type BeforeSignInHook func(ctx context.Context, req *auth.SignInRequest) 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 BeforeUserUpdateHook ¶
type HookRegistry ¶
type HookRegistry struct {
// contains filtered or unexported fields
}
HookRegistry manages all hooks for the authentication system. It is thread-safe and timing-independent - hooks can be registered at any point in the application lifecycle and will always be executed.
func NewHookRegistry ¶
func NewHookRegistry() *HookRegistry
NewHookRegistry creates a new hook registry
func (*HookRegistry) DisableDebug ¶ added in v0.0.3
func (h *HookRegistry) DisableDebug()
DisableDebug disables debug logging
func (*HookRegistry) EnableDebug ¶ added in v0.0.3
func (h *HookRegistry) EnableDebug()
EnableDebug enables verbose debug logging for hook registration and execution
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) ExecuteAfterMemberRemove ¶ added in v0.0.6
func (h *HookRegistry) ExecuteAfterMemberRemove(ctx context.Context, orgID xid.ID, userID xid.ID, memberName string) error
ExecuteAfterMemberRemove executes all after member remove hooks
func (*HookRegistry) ExecuteAfterMemberRoleChange ¶ added in v0.0.6
func (h *HookRegistry) ExecuteAfterMemberRoleChange(ctx context.Context, orgID xid.ID, userID xid.ID, oldRole string, newRole string) error
ExecuteAfterMemberRoleChange executes all after member role change hooks
func (*HookRegistry) ExecuteAfterOrganizationCreate ¶
func (h *HookRegistry) ExecuteAfterOrganizationCreate(ctx context.Context, org interface{}) error
ExecuteAfterOrganizationCreate executes all after organization create hooks
func (*HookRegistry) ExecuteAfterOrganizationDelete ¶ added in v0.0.6
func (h *HookRegistry) ExecuteAfterOrganizationDelete(ctx context.Context, orgID xid.ID, orgName string) error
ExecuteAfterOrganizationDelete executes all after organization delete hooks
func (*HookRegistry) ExecuteAfterOrganizationUpdate ¶ added in v0.0.6
func (h *HookRegistry) ExecuteAfterOrganizationUpdate(ctx context.Context, org interface{}) error
ExecuteAfterOrganizationUpdate executes all after organization update hooks
func (*HookRegistry) ExecuteAfterPermissionEvaluate ¶ added in v0.0.3
func (h *HookRegistry) ExecuteAfterPermissionEvaluate(ctx context.Context, req *PermissionEvaluateRequest, decision *PermissionDecision) error
ExecuteAfterPermissionEvaluate executes all after permission evaluate 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 ¶
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 ¶
ExecuteAfterUserCreate executes all after user create hooks
func (*HookRegistry) ExecuteAfterUserDelete ¶
ExecuteAfterUserDelete executes all after user delete hooks
func (*HookRegistry) ExecuteAfterUserUpdate ¶
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) ExecuteBeforePermissionEvaluate ¶ added in v0.0.3
func (h *HookRegistry) ExecuteBeforePermissionEvaluate(ctx context.Context, req *PermissionEvaluateRequest) error
ExecuteBeforePermissionEvaluate executes all before permission evaluate 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 ¶
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) ExecuteOnAccountDeleted ¶ added in v0.0.6
func (*HookRegistry) ExecuteOnAccountReactivated ¶ added in v0.0.6
func (*HookRegistry) ExecuteOnAccountSuspended ¶ added in v0.0.6
func (*HookRegistry) ExecuteOnAllSessionsRevoked ¶ added in v0.0.6
func (*HookRegistry) ExecuteOnCacheInvalidate ¶ added in v0.0.3
ExecuteOnCacheInvalidate executes all on cache invalidate hooks
func (*HookRegistry) ExecuteOnDeviceRemoved ¶ added in v0.0.6
func (*HookRegistry) ExecuteOnEmailChangeRequest ¶ added in v0.0.6
func (h *HookRegistry) ExecuteOnEmailChangeRequest(ctx context.Context, userID xid.ID, oldEmail, newEmail, confirmationUrl string) error
Account lifecycle hook execution methods
func (*HookRegistry) ExecuteOnEmailChanged ¶ added in v0.0.6
func (*HookRegistry) ExecuteOnNewDeviceDetected ¶ added in v0.0.6
func (h *HookRegistry) ExecuteOnNewDeviceDetected(ctx context.Context, userID xid.ID, deviceName, location, ipAddress string) error
Device/Session security hook execution methods
func (*HookRegistry) ExecuteOnNewLocationDetected ¶ added in v0.0.6
func (*HookRegistry) ExecuteOnPasswordChanged ¶ added in v0.0.6
func (*HookRegistry) ExecuteOnPolicyChange ¶ added in v0.0.3
func (h *HookRegistry) ExecuteOnPolicyChange(ctx context.Context, policyID xid.ID, action string) error
ExecuteOnPolicyChange executes all on policy change hooks
func (*HookRegistry) ExecuteOnSuspiciousLoginDetected ¶ added in v0.0.6
func (*HookRegistry) ExecuteOnUsernameChanged ¶ added in v0.0.6
func (*HookRegistry) GetHookCounts ¶ added in v0.0.3
func (h *HookRegistry) GetHookCounts() map[string]int
GetHookCounts returns the count of registered hooks for diagnostics
func (*HookRegistry) RegisterAfterAppCreate ¶
func (h *HookRegistry) RegisterAfterAppCreate(hook AfterAppCreateHook)
func (*HookRegistry) RegisterAfterMemberAdd ¶
func (h *HookRegistry) RegisterAfterMemberAdd(hook AfterMemberAddHook)
func (*HookRegistry) RegisterAfterMemberRemove ¶ added in v0.0.6
func (h *HookRegistry) RegisterAfterMemberRemove(hook AfterMemberRemoveHook)
func (*HookRegistry) RegisterAfterMemberRoleChange ¶ added in v0.0.6
func (h *HookRegistry) RegisterAfterMemberRoleChange(hook AfterMemberRoleChangeHook)
func (*HookRegistry) RegisterAfterOrganizationCreate ¶
func (h *HookRegistry) RegisterAfterOrganizationCreate(hook AfterOrganizationCreateHook)
func (*HookRegistry) RegisterAfterOrganizationDelete ¶ added in v0.0.6
func (h *HookRegistry) RegisterAfterOrganizationDelete(hook AfterOrganizationDeleteHook)
func (*HookRegistry) RegisterAfterOrganizationUpdate ¶ added in v0.0.6
func (h *HookRegistry) RegisterAfterOrganizationUpdate(hook AfterOrganizationUpdateHook)
func (*HookRegistry) RegisterAfterPermissionEvaluate ¶ added in v0.0.3
func (h *HookRegistry) RegisterAfterPermissionEvaluate(hook AfterPermissionEvaluateHook)
RegisterAfterPermissionEvaluate registers an after permission evaluate hook
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) RegisterBeforePermissionEvaluate ¶ added in v0.0.3
func (h *HookRegistry) RegisterBeforePermissionEvaluate(hook BeforePermissionEvaluateHook)
RegisterBeforePermissionEvaluate registers a before permission evaluate hook
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)
func (*HookRegistry) RegisterOnAccountDeleted ¶ added in v0.0.6
func (h *HookRegistry) RegisterOnAccountDeleted(hook OnAccountDeletedHook)
func (*HookRegistry) RegisterOnAccountReactivated ¶ added in v0.0.6
func (h *HookRegistry) RegisterOnAccountReactivated(hook OnAccountReactivatedHook)
func (*HookRegistry) RegisterOnAccountSuspended ¶ added in v0.0.6
func (h *HookRegistry) RegisterOnAccountSuspended(hook OnAccountSuspendedHook)
func (*HookRegistry) RegisterOnAllSessionsRevoked ¶ added in v0.0.6
func (h *HookRegistry) RegisterOnAllSessionsRevoked(hook OnAllSessionsRevokedHook)
func (*HookRegistry) RegisterOnCacheInvalidate ¶ added in v0.0.3
func (h *HookRegistry) RegisterOnCacheInvalidate(hook OnCacheInvalidateHook)
RegisterOnCacheInvalidate registers an on cache invalidate hook
func (*HookRegistry) RegisterOnDeviceRemoved ¶ added in v0.0.6
func (h *HookRegistry) RegisterOnDeviceRemoved(hook OnDeviceRemovedHook)
func (*HookRegistry) RegisterOnEmailChangeRequest ¶ added in v0.0.6
func (h *HookRegistry) RegisterOnEmailChangeRequest(hook OnEmailChangeRequestHook)
Account lifecycle hook registration methods
func (*HookRegistry) RegisterOnEmailChanged ¶ added in v0.0.6
func (h *HookRegistry) RegisterOnEmailChanged(hook OnEmailChangedHook)
func (*HookRegistry) RegisterOnNewDeviceDetected ¶ added in v0.0.6
func (h *HookRegistry) RegisterOnNewDeviceDetected(hook OnNewDeviceDetectedHook)
Device/Session security hook registration methods
func (*HookRegistry) RegisterOnNewLocationDetected ¶ added in v0.0.6
func (h *HookRegistry) RegisterOnNewLocationDetected(hook OnNewLocationDetectedHook)
func (*HookRegistry) RegisterOnPasswordChanged ¶ added in v0.0.6
func (h *HookRegistry) RegisterOnPasswordChanged(hook OnPasswordChangedHook)
func (*HookRegistry) RegisterOnPolicyChange ¶ added in v0.0.3
func (h *HookRegistry) RegisterOnPolicyChange(hook OnPolicyChangeHook)
RegisterOnPolicyChange registers an on policy change hook
func (*HookRegistry) RegisterOnSuspiciousLoginDetected ¶ added in v0.0.6
func (h *HookRegistry) RegisterOnSuspiciousLoginDetected(hook OnSuspiciousLoginDetectedHook)
func (*HookRegistry) RegisterOnUsernameChanged ¶ added in v0.0.6
func (h *HookRegistry) RegisterOnUsernameChanged(hook OnUsernameChangedHook)
type OnAccountDeletedHook ¶ added in v0.0.6
type OnAccountReactivatedHook ¶ added in v0.0.6
type OnAccountSuspendedHook ¶ added in v0.0.6
type OnAllSessionsRevokedHook ¶ added in v0.0.6
type OnCacheInvalidateHook ¶ added in v0.0.3
type OnDeviceRemovedHook ¶ added in v0.0.6
type OnEmailChangeRequestHook ¶ added in v0.0.6
type OnEmailChangeRequestHook func(ctx context.Context, userID xid.ID, oldEmail, newEmail, confirmationUrl string) error
Account lifecycle hooks
type OnEmailChangedHook ¶ added in v0.0.6
type OnNewDeviceDetectedHook ¶ added in v0.0.6
type OnNewDeviceDetectedHook func(ctx context.Context, userID xid.ID, deviceName, location, ipAddress string) error
Device/Session security hooks
type OnNewLocationDetectedHook ¶ added in v0.0.6
type OnPasswordChangedHook ¶ added in v0.0.6
type OnPolicyChangeHook ¶ added in v0.0.3
type OnSuspiciousLoginDetectedHook ¶ added in v0.0.6
type OnUsernameChangedHook ¶ added in v0.0.6
type PermissionDecision ¶ added in v0.0.3
type PermissionDecision struct {
Allowed bool
MatchedPolicies []string
EvaluationTimeMs float64
CacheHit bool
Error string
}
PermissionDecision is passed to after permission evaluate hook
type PermissionEvaluateRequest ¶ added in v0.0.3
type PermissionEvaluateRequest struct {
UserID xid.ID
ResourceType string
ResourceID string
Action string
Context map[string]interface{}
}
Permission hooks (for permissions plugin) PermissionEvaluateRequest is passed to before/after permission evaluate hooks