- 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
26 lines
337 B
Go
26 lines
337 B
Go
package auth
|
|
|
|
import (
|
|
"github.com/pkg/errors"
|
|
)
|
|
|
|
type (
|
|
authError string
|
|
)
|
|
|
|
const (
|
|
ErrConfigError = authError("ConfigError")
|
|
)
|
|
|
|
func (e authError) Error() string {
|
|
return e.String()
|
|
}
|
|
|
|
func (e authError) String() string {
|
|
return "crust.internal.auth." + string(e)
|
|
}
|
|
|
|
func (e authError) New() error {
|
|
return errors.WithStack(e)
|
|
}
|