Documentation ¶
Index ¶
- Variables
- func Authenticator(c *gin.Context) (interface{}, error)
- func Authorizator(data interface{}, c *gin.Context) bool
- func IdentityHandler(c *gin.Context) interface{}
- func Middleware() (*jwt.GinJWTMiddleware, error)
- func Payload(data interface{}) jwt.MapClaims
- func Unauthorized(c *gin.Context, code int, message string)
- type Controller
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrMissingRegisterValues = errors.New("Username, password or password confirmation not provided") ErrPasswordsDontMatch = errors.New("Passwords do not match") ErrUsernameTooShort = errors.New("Username must be at least 6 characters") ErrPasswordTooShort = errors.New("Password must be at least 6 characters") ErrUsernameAlreadyInUse = errors.New("The username is already in use") )
Functions ¶
func Authenticator ¶
func Authorizator ¶
func IdentityHandler ¶
func Middleware ¶
func Middleware() (*jwt.GinJWTMiddleware, error)
Types ¶
type Controller ¶
type Controller struct{}
func (*Controller) Register ¶
func (controller *Controller) Register(c *gin.Context)
Click to show internal directories.
Click to hide internal directories.