Documentation ¶
Index ¶
- Constants
- func HashPassword(password string) [32]byte
- func SecretGenerator() []byte
- type Auth
- func (a *Auth) CookieAuthIsValid(c *gin.Context) bool
- func (a *Auth) CookieAuthRequired() gin.HandlerFunc
- func (a *Auth) DeleteSessionCookie(c *gin.Context)
- func (a *Auth) HeaderAuthIsValid(c *gin.Context) bool
- func (a *Auth) HeaderAuthRequired() gin.HandlerFunc
- func (a *Auth) NoPasswordSet() bool
- func (a *Auth) PasswordEquals(input string) bool
- func (a *Auth) SetSessionCookie(c *gin.Context)
Constants ¶
View Source
const (
JwtExpiry = 30 * 24 * time.Hour
)
Variables ¶
This section is empty.
Functions ¶
func HashPassword ¶ added in v0.0.4
func SecretGenerator ¶
func SecretGenerator() []byte
Types ¶
type Auth ¶
func (*Auth) CookieAuthRequired ¶
func (a *Auth) CookieAuthRequired() gin.HandlerFunc
func (*Auth) DeleteSessionCookie ¶
func (*Auth) HeaderAuthRequired ¶ added in v1.0.2
func (a *Auth) HeaderAuthRequired() gin.HandlerFunc
func (*Auth) NoPasswordSet ¶ added in v0.0.2
func (*Auth) PasswordEquals ¶
func (*Auth) SetSessionCookie ¶
Click to show internal directories.
Click to hide internal directories.