mirror of
https://github.com/therootcompany/golib.git
synced 2026-03-02 23:57:59 +00:00
feat(auth): add BasicVerifier, BasicAuthenticator, and BasicPrinciple for interfaces without implementation dependency
This commit is contained in:
parent
d756f205b0
commit
ff8cdec1d7
14
auth/auth.go
Normal file
14
auth/auth.go
Normal file
@ -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
|
||||||
|
}
|
||||||
3
auth/go.mod
Normal file
3
auth/go.mod
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
module github.com/therootcompany/golib/auth
|
||||||
|
|
||||||
|
go 1.25.0
|
||||||
Loading…
x
Reference in New Issue
Block a user