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