summaryrefslogtreecommitdiff
path: root/internal/regulation/types.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/regulation/types.go')
-rw-r--r--internal/regulation/types.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/internal/regulation/types.go b/internal/regulation/types.go
index 510ac2226..3e902a78d 100644
--- a/internal/regulation/types.go
+++ b/internal/regulation/types.go
@@ -1,6 +1,9 @@
package regulation
import (
+ "context"
+ "net"
+
"github.com/authelia/authelia/v4/internal/configuration/schema"
"github.com/authelia/authelia/v4/internal/storage"
"github.com/authelia/authelia/v4/internal/utils"
@@ -17,3 +20,16 @@ type Regulator struct {
clock utils.Clock
}
+
+// Context represents a regulator context.
+type Context interface {
+ context.Context
+ MetricsRecorder
+
+ RemoteIP() (ip net.IP)
+}
+
+// MetricsRecorder represents the methods used to record regulation.
+type MetricsRecorder interface {
+ RecordAuthentication(success, banned bool, authType string)
+}