Documentation ¶
Index ¶
- Variables
- func GetAuth(guard string) auth.Auth
- func Logout(ctx *frame.Context)
- func NewAuth(guard string) contractauth.Auth
- func NewSession(guard string) contractauth.Auth
- type Application
- type Auth
- func (app *Auth) Guard(name string) contractauth.Auth
- func (app *Auth) Login(ctx *frame.Context, user contractauth.User) (token string, err error)
- func (app *Auth) LoginUsingID(ctx *frame.Context, id any) (token string, err error)
- func (app *Auth) Logout(ctx *frame.Context) error
- func (app *Auth) Parse(ctx *frame.Context, token string) error
- func (app *Auth) Refresh(ctx *frame.Context) (token string, err error)
- func (app *Auth) User(ctx *frame.Context, user contractauth.User) error
- type Claims
- type Guard
- type Guards
- type ServiceProvider
- type Session
- func (app *Session) Guard(name string) contractauth.Auth
- func (app *Session) Login(ctx *frame.Context, user contractauth.User) (token string, err error)
- func (app *Session) LoginUsingID(ctx *frame.Context, id any) (token string, err error)
- func (app *Session) Logout(ctx *frame.Context) error
- func (app *Session) Parse(ctx *frame.Context, token string) error
- func (app *Session) Refresh(ctx *frame.Context) (token string, err error)
- func (app *Session) User(ctx *frame.Context, user contractauth.User) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrorRefreshTimeExceeded = errors.New("refresh time exceeded") ErrorTokenExpired = errors.New("token expired") ErrorNoPrimaryKeyField = errors.New("the primaryKey field was not found in the model, set primaryKey like orm.Model") ErrorEmptySecret = errors.New("secret is required") ErrorTokenDisabled = errors.New("token is disabled") ErrorParseTokenFirst = errors.New("parse token first") ErrorInvalidClaims = errors.New("invalid claims") ErrorInvalidToken = errors.New("invalid token") )
View Source
var Drivers *drivers
Functions ¶
func NewAuth ¶ added in v1.0.31
func NewAuth(guard string) contractauth.Auth
func NewSession ¶ added in v1.0.25
func NewSession(guard string) contractauth.Auth
Types ¶
type Application ¶
type Application struct {
// contains filtered or unexported fields
}
type Auth ¶ added in v1.0.12
type Auth struct {
// contains filtered or unexported fields
}
func (*Auth) LoginUsingID ¶ added in v1.0.31
type ServiceProvider ¶
func (*ServiceProvider) Boot ¶
func (database *ServiceProvider) Boot()
func (*ServiceProvider) Register ¶
func (database *ServiceProvider) Register()
type Session ¶ added in v1.0.25
type Session struct {
// contains filtered or unexported fields
}
func (*Session) LoginUsingID ¶ added in v1.0.25
Click to show internal directories.
Click to hide internal directories.