Documentation
¶
Index ¶
- Constants
- Variables
- type Auth
- func (a *Auth) Guard(name string) contractsauth.Auth
- func (a *Auth) ID() (string, error)
- 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" BindingGate = "goravel.gate" )
Variables ¶
View Source
var ( ErrorRefreshTimeExceeded = errors.AuthRefreshTimeExceeded ErrorTokenExpired = errors.AuthTokenExpired ErrorNoPrimaryKeyField = errors.AuthNoPrimaryKeyField ErrorEmptySecret = errors.AuthEmptySecret ErrorTokenDisabled = errors.AuthTokenDisabled ErrorParseTokenFirst = errors.AuthParseTokenFirst ErrorInvalidClaims = errors.AuthInvalidClaims ErrorInvalidToken = errors.AuthInvalidToken ErrorInvalidKey = errors.AuthInvalidKey )
These errors may be used by user's project, so we can't remove them.
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 Claims ¶
type Claims struct {
Key string `json:"key"`
jwt.RegisteredClaims
}
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.