add(auth): TokenEncoder interface parth of auth pkg
This commit is contained in:
@@ -1,11 +1,6 @@
|
||||
package auth
|
||||
|
||||
type (
|
||||
Identifiable interface {
|
||||
Identity() uint64
|
||||
Valid() bool
|
||||
}
|
||||
|
||||
Identity struct {
|
||||
identity uint64
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
package auth
|
||||
|
||||
type (
|
||||
Identifiable interface {
|
||||
Identity() uint64
|
||||
Valid() bool
|
||||
}
|
||||
|
||||
TokenEncoder interface {
|
||||
Encode(identity Identifiable) string
|
||||
}
|
||||
)
|
||||
Reference in New Issue
Block a user