new version
This commit is contained in:
@@ -41,6 +41,18 @@ func IPKeyFn(prefix string) func(c *gin.Context) string {
|
||||
}
|
||||
}
|
||||
|
||||
func TokenKeyFn(c *gin.Context) string {
|
||||
return "token:" + c.ClientIP()
|
||||
}
|
||||
|
||||
func RevokeKeyFn(c *gin.Context) string {
|
||||
return "revoke:" + c.ClientIP()
|
||||
}
|
||||
|
||||
func RefreshKeyFn(c *gin.Context) string {
|
||||
return "refresh:" + c.ClientIP()
|
||||
}
|
||||
|
||||
func itoa(n int) string {
|
||||
if n < 0 {
|
||||
return "0"
|
||||
|
||||
Reference in New Issue
Block a user