Documentation ¶
Index ¶
- func AuthenticationHook(strategies ...string) feathers.Hook
- func Configure(app *feathers.App, config map[string]interface{}) error
- func HashPassword(field string) feathers.Hook
- func NewModel() interface{}
- func Uuid4() string
- type AuthService
- func (as *AuthService) Create(ctx context.Context, data map[string]interface{}, params feathers.Params) (interface{}, error)
- func (as *AuthService) DefaultConfig() DefaultAuthConfig
- func (as *AuthService) Find(ctx context.Context, params feathers.Params) (interface{}, error)
- func (as *AuthService) Get(ctx context.Context, id string, params feathers.Params) (interface{}, error)
- func (as *AuthService) Patch(ctx context.Context, id string, data map[string]interface{}, ...) (interface{}, error)
- func (as *AuthService) Remove(ctx context.Context, id string, params feathers.Params) (interface{}, error)
- func (as *AuthService) Update(ctx context.Context, id string, data map[string]interface{}, ...) (interface{}, error)
- type AuthStrategy
- type BaseAuthStrategy
- func (bas *BaseAuthStrategy) Config(key string) (interface{}, bool)
- func (bas *BaseAuthStrategy) DefaultConfig() DefaultAuthConfig
- func (bas *BaseAuthStrategy) EntityService() (feathers.Service, bool)
- func (bas *BaseAuthStrategy) SetApp(app *feathers.App)
- func (bas *BaseAuthStrategy) SetConfiguration(config map[string]interface{})
- func (bas *BaseAuthStrategy) SetName(name string)
- func (bas *BaseAuthStrategy) StrategyConfig(config interface{}) error
- type DefaultAuthConfig
- type JwtStrategy
- type Model
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthenticationHook ¶
func HashPassword ¶
HashPassword is a hool which hashes the password in the given field using bcrypt. If the field is not set or cannot be converted a error is retunred
Types ¶
type AuthService ¶
type AuthService struct { *feathers.BaseService *feathers.ModelService // contains filtered or unexported fields }
func NewAuthService ¶
func NewAuthService(app *feathers.App, strategies map[string]AuthStrategy) *AuthService
func (*AuthService) DefaultConfig ¶
func (as *AuthService) DefaultConfig() DefaultAuthConfig
type AuthStrategy ¶
type BaseAuthStrategy ¶
type BaseAuthStrategy struct {
// contains filtered or unexported fields
}
func NewBaseAuthStrategy ¶
func NewBaseAuthStrategy(name string, app *feathers.App) *BaseAuthStrategy
func (*BaseAuthStrategy) Config ¶
func (bas *BaseAuthStrategy) Config(key string) (interface{}, bool)
func (*BaseAuthStrategy) DefaultConfig ¶
func (bas *BaseAuthStrategy) DefaultConfig() DefaultAuthConfig
func (*BaseAuthStrategy) EntityService ¶
func (bas *BaseAuthStrategy) EntityService() (feathers.Service, bool)
func (*BaseAuthStrategy) SetApp ¶
func (bas *BaseAuthStrategy) SetApp(app *feathers.App)
func (*BaseAuthStrategy) SetConfiguration ¶
func (bas *BaseAuthStrategy) SetConfiguration(config map[string]interface{})
func (*BaseAuthStrategy) SetName ¶
func (bas *BaseAuthStrategy) SetName(name string)
func (*BaseAuthStrategy) StrategyConfig ¶
func (bas *BaseAuthStrategy) StrategyConfig(config interface{}) error
type DefaultAuthConfig ¶
type JwtStrategy ¶
type JwtStrategy struct {
*BaseAuthStrategy
}
func NewJwtStrategy ¶
func NewJwtStrategy() *JwtStrategy
func (*JwtStrategy) Authenticate ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.