Documentation ¶
Index ¶
- func AuthWithBasic(c *gin.Context, bs64Token string) error
- func AuthWithJWT(c *gin.Context, token string) error
- func AuthWithPrivateToken(c *gin.Context, token string) error
- func AuthWithSession(c *gin.Context) (err error)
- func DeleteUserSession(c *gin.Context) error
- func GetRepoImageForUpload(c *gin.Context, imgUser, name, tag string) (repo *models.Repository, img *models.Image, err error)
- func LoginUser(c *gin.Context) (user *models.User, exists bool)
- func SaveUserSession(c *gin.Context, u *models.User) error
- type JWT
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthWithSession ¶
func DeleteUserSession ¶
func GetRepoImageForUpload ¶
Types ¶
type JWT ¶
type JWT struct {
SigningKey []byte
}
func (*JWT) CreateToken ¶
func (j *JWT) CreateToken(claims models.CustomClaims) (string, error)
CreateToken create token
func (*JWT) ParseToken ¶
func (j *JWT) ParseToken(tokenString string) (*models.CustomClaims, error)
ParseToken parse token
Click to show internal directories.
Click to hide internal directories.