Versions in this module Expand all Collapse all v0 v0.0.16 Feb 11, 2026 v0.0.15 Feb 11, 2026 Changes in this version type ContextKey + const ImpersonationActionContextKey v0.0.14 Jan 4, 2026 v0.0.13 Jan 3, 2026 v0.0.12 Jan 3, 2026 v0.0.11 Jan 3, 2026 v0.0.10 Jan 3, 2026 v0.0.9 Jan 3, 2026 v0.0.8 Dec 31, 2025 v0.0.7 Dec 29, 2025 Changes in this version + type EndImpersonationRequest struct + ImpersonationID string + Reason string + type GetImpersonationRequest struct + ID string + type ListAuditEventsRequest struct + EventType string + ImpersonationID string + Limit int + Offset int + Page int + type ListImpersonationsRequest struct + ActiveOnly *bool + ImpersonatorID string + Limit int + Offset int + Page int + TargetUserID string + type StartImpersonationRequest struct + DurationMinutes int + Reason string + TargetUserID string + TicketNumber string + type VerifyImpersonationRequest struct + SessionID string v0.0.6 Dec 17, 2025 v0.0.5 Dec 12, 2025 v0.0.4 Dec 8, 2025 v0.0.3 Dec 8, 2025 v0.0.2 Nov 24, 2025 v0.0.1 Nov 20, 2025 Changes in this version + const PluginID + const PluginName + const PluginVersion + func GetImpersonatorID(c forge.Context) *xid.ID + func GetTargetUserID(c forge.Context) *xid.ID + func IsImpersonating(c forge.Context) bool + type Config struct + AuditAllActions bool + AutoCleanupEnabled bool + CleanupInterval time.Duration + DefaultDurationMinutes int + ImpersonatePermission string + IndicatorMessage string + MaxDurationMinutes int + MinDurationMinutes int + MinReasonLength int + RequirePermission bool + RequireReason bool + RequireTicket bool + ShowIndicator bool + WebhookOnEnd bool + WebhookOnStart bool + WebhookURLs []string + func DefaultConfig() Config + func (c *Config) Validate() error + type ContextKey string + const ImpersonationContextKey + type ErrorResponse = responses.ErrorResponse + type Handler struct + func NewHandler(service *impersonation.Service, config Config) *Handler + func (h *Handler) EndImpersonation(c forge.Context) error + func (h *Handler) GetImpersonation(c forge.Context) error + func (h *Handler) ListAuditEvents(c forge.Context) error + func (h *Handler) ListImpersonations(c forge.Context) error + func (h *Handler) StartImpersonation(c forge.Context) error + func (h *Handler) VerifyImpersonation(c forge.Context) error + type ImpersonationAuditResponse []interface + type ImpersonationContext struct + ImpersonationID *xid.ID + ImpersonatorID *xid.ID + IndicatorMsg string + IsImpersonating bool + TargetUserID *xid.ID + func GetImpersonationContext(c forge.Context) *ImpersonationContext + type ImpersonationEndResponse struct + EndedAt string + Status string + type ImpersonationErrorResponse struct + Error string + type ImpersonationListResponse []interface + type ImpersonationMiddleware struct + func NewMiddleware(service *impersonation.Service, config Config) *ImpersonationMiddleware + func (m *ImpersonationMiddleware) AuditImpersonationAction() func(forge.Context) error + func (m *ImpersonationMiddleware) Handle() func(forge.Context) error + func (m *ImpersonationMiddleware) RequireImpersonation() func(forge.Context) error + func (m *ImpersonationMiddleware) RequireNoImpersonation() func(forge.Context) error + type ImpersonationSession struct + type ImpersonationStartResponse struct + ImpersonatorID string + SessionID string + StartedAt string + TargetUserID string + type ImpersonationVerifyResponse struct + ImpersonatorID string + IsImpersonating bool + TargetUserID string + type MessageResponse = responses.MessageResponse + type Plugin struct + func NewPlugin() *Plugin + func (p *Plugin) Description() string + func (p *Plugin) GetMiddleware() *ImpersonationMiddleware + func (p *Plugin) GetService() *impersonation.Service + func (p *Plugin) Health(ctx context.Context) error + func (p *Plugin) ID() string + func (p *Plugin) Init(authInst core.Authsome) error + func (p *Plugin) Migrate() error + func (p *Plugin) Name() string + func (p *Plugin) RegisterHooks(hookRegistry *hooks.HookRegistry) error + func (p *Plugin) RegisterRoutes(router forge.Router) error + func (p *Plugin) RegisterServiceDecorators(serviceRegistry *registry.ServiceRegistry) error + func (p *Plugin) Shutdown(ctx context.Context) error + func (p *Plugin) Version() string + type StatusResponse = responses.StatusResponse + type SuccessResponse = responses.SuccessResponse