Documentation
¶
Index ¶
- Variables
- type Auth
- func (auth *Auth) CompareCombination(c *gin.Context, userID string, clientIP string) bool
- func (auth *Auth) GenErrMsg(c *gin.Context, desc string, err error) error
- func (auth *Auth) GenOkMsg(c *gin.Context, desc string) string
- func (auth *Auth) ValidateSignature() gin.HandlerFunc
- func (auth *Auth) ValidateToken() gin.HandlerFunc
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Auth ¶
func (*Auth) CompareCombination ¶
验证规则: 1. 当前请求IP或是header中的clientIP,与JWT中当初token签发IP相同 2. header中的userID与JWT中userID相同
func (*Auth) ValidateSignature ¶
func (auth *Auth) ValidateSignature() gin.HandlerFunc
func (*Auth) ValidateToken ¶
func (auth *Auth) ValidateToken() gin.HandlerFunc
Click to show internal directories.
Click to hide internal directories.