From ff8cdec1d7f4d52da452cd508f9654ff5a862957 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Thu, 26 Feb 2026 17:22:15 -0700 Subject: [PATCH] feat(auth): add BasicVerifier, BasicAuthenticator, and BasicPrinciple for interfaces without implementation dependency --- auth/auth.go | 14 ++++++++++++++ auth/go.mod | 3 +++ 2 files changed, 17 insertions(+) create mode 100644 auth/auth.go create mode 100644 auth/go.mod diff --git a/auth/auth.go b/auth/auth.go new file mode 100644 index 0000000..393a4da --- /dev/null +++ b/auth/auth.go @@ -0,0 +1,14 @@ +package auth + +type BasicVerifier interface { + Verify(string, string) error +} + +type BasicAuthenticator interface { + Authenticate(string, string) (BasicPrinciple, error) +} + +type BasicPrinciple interface { + ID() string + Permissions() []string +} diff --git a/auth/go.mod b/auth/go.mod new file mode 100644 index 0000000..7169da8 --- /dev/null +++ b/auth/go.mod @@ -0,0 +1,3 @@ +module github.com/therootcompany/golib/auth + +go 1.25.0