events

package
v2.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2026 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuditMetadata

type AuditMetadata struct {
	ClientIP  string `json:"client_ip,omitempty"`  // IP address of the client (may be masked)
	UserAgent string `json:"user_agent,omitempty"` // User agent string
	DeviceID  string `json:"device_id,omitempty"`  // Device identifier for session tracking
}

AuditMetadata contains optional audit information for security events

type TokenReuseMaliciousEvent

type TokenReuseMaliciousEvent struct {
	Type              string        `json:"type"`
	SessionID         string        `json:"session_id"`
	TokenHash         string        `json:"token_hash"`
	DeltaMs           int64         `json:"delta_ms"`            // Milliseconds between revocation and reuse
	GracePeriodConfig string        `json:"grace_period_config"` // Configured grace period as string
	Metadata          AuditMetadata `json:"metadata"`
	Timestamp         string        `json:"timestamp"`
}

TokenReuseMaliciousEvent emitted when a token is reused after the grace period expires (potential attack)

type TokenReuseRecoveredEvent

type TokenReuseRecoveredEvent struct {
	Type              string        `json:"type"`
	SessionID         string        `json:"session_id"`
	TokenHash         string        `json:"token_hash"`
	DeltaMs           int64         `json:"delta_ms"`            // Milliseconds between revocation and reuse
	GracePeriodConfig string        `json:"grace_period_config"` // Configured grace period as string
	Metadata          AuditMetadata `json:"metadata"`
	Timestamp         string        `json:"timestamp"`
}

TokenReuseRecoveredEvent emitted when a token is reused within the grace period (first occurrence)

type TokenReuseThrottledEvent

type TokenReuseThrottledEvent struct {
	Type              string        `json:"type"`
	SessionID         string        `json:"session_id"`
	TokenHash         string        `json:"token_hash"`
	DeltaMs           int64         `json:"delta_ms"`            // Milliseconds between revocation and reuse
	GracePeriodConfig string        `json:"grace_period_config"` // Configured grace period as string
	AttemptCount      int           `json:"attempt_count"`       // Number of reuse attempts
	Metadata          AuditMetadata `json:"metadata"`
	Timestamp         string        `json:"timestamp"`
}

TokenReuseThrottledEvent emitted when a token is reused multiple times within the grace period

Jump to

Keyboard shortcuts

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