- moved rbac store and config to internal pkg, - split auth authenticators to internal pkg, - add rbac config object to internal/config, - update package imports and references for auth, - clean up main with pkg aliases
22 lines
263 B
Go
22 lines
263 B
Go
package auth
|
|
|
|
type (
|
|
Identity struct {
|
|
identity uint64
|
|
}
|
|
)
|
|
|
|
func NewIdentity(id uint64) *Identity {
|
|
return &Identity{
|
|
identity: id,
|
|
}
|
|
}
|
|
|
|
func (i Identity) Identity() uint64 {
|
|
return i.identity
|
|
}
|
|
|
|
func (i Identity) Valid() bool {
|
|
return i.identity > 0
|
|
}
|