Documentation ¶
Index ¶
- Variables
- func GetAuth(guard string) auth.Auth
- func Logout(ctx *frame.Context)
- func NewJwt(guard string) auth.Auth
- func NewSession(guard string) auth.Auth
- type Application
- type Claims
- type Guard
- type Guards
- type Jwt
- func (app *Jwt) Guard(name string) auth.Auth
- func (app *Jwt) Login(ctx *frame.Context, user auth.User) (token string, err error)
- func (app *Jwt) LoginUsingID(ctx *frame.Context, id any) (token string, err error)
- func (app *Jwt) Logout(ctx *frame.Context) error
- func (app *Jwt) Parse(ctx *frame.Context, token string) error
- func (app *Jwt) Refresh(ctx *frame.Context) (token string, err error)
- func (app *Jwt) User(ctx *frame.Context, user auth.User) error
- type ServiceProvider
- type Session
- func (app *Session) Guard(name string) auth.Auth
- func (app *Session) Login(ctx *frame.Context, user auth.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 auth.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 NewSession ¶ added in v1.0.25
Types ¶
type Application ¶
type Application struct {
// contains filtered or unexported fields
}
type Jwt ¶ added in v1.0.25
type Jwt struct {
// contains filtered or unexported fields
}
func (*Jwt) LoginUsingID ¶ added in v1.0.25
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.