Documentation ¶
Index ¶
- Constants
- func AuthJwtCookie(c *gin.Context)
- func GetContext(c *gin.Context) context.Context
- func GetUID(c *gin.Context) string
- func Logger(c *gin.Context)
- func NewJwtToken(userID string) (string, error)
- func SetJwtHmacSecret(secret string)
- func SetJwtToHeader(c *gin.Context, userID string) error
- type JwtClaims
- type Validator
Constants ¶
View Source
const (
// RequestIDKey is the key used to store the request ID in the context.
RequestIDKey = "request_id"
)
Variables ¶
This section is empty.
Functions ¶
func AuthJwtCookie ¶
func NewJwtToken ¶
func SetJwtHmacSecret ¶
func SetJwtHmacSecret(secret string)
Types ¶
type JwtClaims ¶
type JwtClaims struct { UserID string `json:"uid"` jwt.RegisteredClaims }
func ParseJwtToken ¶
Click to show internal directories.
Click to hide internal directories.