Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SecureHeaders ¶
func SecureHeaders() gin.HandlerFunc
SecureHeaders adds general security headers for basic security measures
Types ¶
type JWT ¶
type JWT struct { // Realm name to display to the user. Realm string // Secret key used for signing. Key []byte // Duration for which the jwt token is valid. Duration time.Duration // JWT signing algorithm Algo string }
JWT provides a Json-Web-Token authentication implementation
func (*JWT) GenerateToken ¶
GenerateToken generates new JWT token and populates it with user data
func (*JWT) MWFunc ¶
func (j *JWT) MWFunc() gin.HandlerFunc
MWFunc makes JWT implement the Middleware interface.
Click to show internal directories.
Click to hide internal directories.