Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrEmptySecretKey = errors.New("Secret key for auth module should not be empty")
View Source
var ErrInvalidUserObjectType = errors.New("Could not cast object to user")
View Source
var ErrNilUserRepo = errors.New("User repository should not be nil for auth module creation")
View Source
var ErrUserObjectNotFound = errors.New("User object not found in gin context")
Functions ¶
func GetUserFromContext ¶
func GetUserFromContext(c *gin.Context) (models.UserWithPassword, error)
Types ¶
type Auth ¶
type Auth struct {
// contains filtered or unexported fields
}
func (*Auth) GetGinAuthMiddleware ¶
func (a *Auth) GetGinAuthMiddleware() *jwt.GinJWTMiddleware
func (*Auth) Middleware ¶
func (a *Auth) Middleware() gin.HandlerFunc
func (*Auth) RegisterRoutes ¶
func (a *Auth) RegisterRoutes(group *gin.RouterGroup)
func (*Auth) RegisterUserHandler ¶
func (a *Auth) RegisterUserHandler() gin.HandlerFunc
Click to show internal directories.
Click to hide internal directories.