Documentation ¶
Index ¶
- Variables
- func NewApplication(guard string) contractauth.Auth
- type Application
- func (app *Application) Guard(name string) contractauth.Auth
- func (app *Application) Login(ctx http.Context, user any) (token string, err error)
- func (app *Application) LoginUsingID(ctx http.Context, id any) (token string, err error)
- func (app *Application) Logout(ctx http.Context) error
- func (app *Application) Parse(ctx http.Context, token string) error
- func (app *Application) Refresh(ctx http.Context) (token string, err error)
- func (app *Application) User(ctx http.Context, user any) error
- type Auth
- type Claims
- type Guard
- type ServiceProvider
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") )
Functions ¶
func NewApplication ¶
func NewApplication(guard string) contractauth.Auth
Types ¶
type Application ¶
type Application struct {
// contains filtered or unexported fields
}
func (*Application) Guard ¶
func (app *Application) Guard(name string) contractauth.Auth
func (*Application) LoginUsingID ¶
type ServiceProvider ¶
type ServiceProvider struct { }
func (*ServiceProvider) Boot ¶
func (database *ServiceProvider) Boot()
func (*ServiceProvider) Register ¶
func (database *ServiceProvider) Register()
Click to show internal directories.
Click to hide internal directories.