Documentation ¶
Index ¶
- Constants
- Variables
- type Auth
- func (a *Auth) Guard(name string) contractsauth.Auth
- func (a *Auth) Login(user any) (token string, err error)
- func (a *Auth) LoginUsingID(id any) (token string, err error)
- func (a *Auth) Logout() error
- func (a *Auth) Parse(token string) (*contractsauth.Payload, error)
- func (a *Auth) Refresh() (token string, err error)
- func (a *Auth) User(user any) error
- type Claims
- type Guard
- type Guards
- type ServiceProvider
Constants ¶
View Source
const BindingAuth = "goravel.auth"
View Source
const BindingGate = "goravel.gate"
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") ErrorInvalidKey = errors.New("invalid key") )
Functions ¶
This section is empty.
Types ¶
type Auth ¶ added in v1.2.0
type Auth struct {
// contains filtered or unexported fields
}
func (*Auth) LoginUsingID ¶ added in v1.6.0
func (*Auth) Parse ¶ added in v1.6.0
func (a *Auth) Parse(token string) (*contractsauth.Payload, error)
type ServiceProvider ¶
type ServiceProvider struct { }
func (*ServiceProvider) Boot ¶
func (database *ServiceProvider) Boot(app foundation.Application)
func (*ServiceProvider) Register ¶
func (database *ServiceProvider) Register(app foundation.Application)
Click to show internal directories.
Click to hide internal directories.