Documentation ¶
Index ¶
- func CreateAuthCore(z *zepto.Zepto, opts authcore.AuthCore) *authcore.AuthCore
- type AuthToken
- func (at *AuthToken) AppendMiddlewares() []web.MiddlewareFunc
- func (at *AuthToken) Instance() interface{}
- func (at *AuthToken) Name() string
- func (at *AuthToken) OnCreated(z *zepto.Zepto)
- func (at *AuthToken) OnZeptoInit(z *zepto.Zepto)
- func (at *AuthToken) OnZeptoStart(z *zepto.Zepto)
- func (at *AuthToken) OnZeptoStop(z *zepto.Zepto)
- func (at *AuthToken) PrependMiddlewares() []web.MiddlewareFunc
- type AuthTokenInstance
- type AuthTokenOptions
- type DefaultAuthTokenInstance
- func (d *DefaultAuthTokenInstance) Auth(username string, password string) (*authcore.Token, error)
- func (d *DefaultAuthTokenInstance) Core() *authcore.AuthCore
- func (d *DefaultAuthTokenInstance) LoggedPIDFromCtx(ctx web.Context) authcore.PID
- func (d *DefaultAuthTokenInstance) Logout(authToken string) error
- func (d *DefaultAuthTokenInstance) PasswordRecovery(email string) error
- func (d *DefaultAuthTokenInstance) ResetPassword(resetPasswordToken string, password string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AuthToken ¶
type AuthToken struct {
// contains filtered or unexported fields
}
func NewAuthTokenPlugin ¶
func NewAuthTokenPlugin(opts AuthTokenOptions) *AuthToken
func (*AuthToken) AppendMiddlewares ¶
func (at *AuthToken) AppendMiddlewares() []web.MiddlewareFunc
func (*AuthToken) OnZeptoInit ¶
func (*AuthToken) OnZeptoStart ¶
func (*AuthToken) OnZeptoStop ¶
func (*AuthToken) PrependMiddlewares ¶
func (at *AuthToken) PrependMiddlewares() []web.MiddlewareFunc
type AuthTokenInstance ¶
type AuthTokenInstance interface { Core() *authcore.AuthCore LoggedPIDFromCtx(ctx web.Context) authcore.PID Auth(username string, password string) (*authcore.Token, error) Logout(authToken string) error PasswordRecovery(email string) error ResetPassword(resetPasswordToken string, password string) error }
func InstanceFromCtx ¶
func InstanceFromCtx(ctx web.Context) AuthTokenInstance
type AuthTokenOptions ¶
type AuthTokenOptions struct { Datasource authcore.AuthDatasource TokenEncoder authcore.AuthEncoder Store authcore.AuthStore Notifier authcore.AuthNotifier AuthContextKey string }
type DefaultAuthTokenInstance ¶
func (*DefaultAuthTokenInstance) Core ¶
func (d *DefaultAuthTokenInstance) Core() *authcore.AuthCore
func (*DefaultAuthTokenInstance) LoggedPIDFromCtx ¶
func (d *DefaultAuthTokenInstance) LoggedPIDFromCtx(ctx web.Context) authcore.PID
func (*DefaultAuthTokenInstance) Logout ¶
func (d *DefaultAuthTokenInstance) Logout(authToken string) error
func (*DefaultAuthTokenInstance) PasswordRecovery ¶
func (d *DefaultAuthTokenInstance) PasswordRecovery(email string) error
func (*DefaultAuthTokenInstance) ResetPassword ¶
func (d *DefaultAuthTokenInstance) ResetPassword(resetPasswordToken string, password string) error
Click to show internal directories.
Click to hide internal directories.