mirror of
https://github.com/weloe/token-go.git
synced 2025-10-05 15:36:50 +08:00
feat: add banned feature and api IsLoginByToken()
This commit is contained in:
@@ -144,6 +144,10 @@ func (e *Enforcer) spliceTokenKey(id string) string {
|
||||
return e.config.TokenName + ":" + e.loginType + ":token:" + id
|
||||
}
|
||||
|
||||
func (e *Enforcer) spliceBannedKey(id string, service string) string {
|
||||
return e.config.TokenName + ":" + e.loginType + ":ban:" + service + ":" + id
|
||||
}
|
||||
|
||||
func (e *Enforcer) SetJwtSecretKey(key string) {
|
||||
e.config.JwtSecretKey = key
|
||||
}
|
||||
|
Reference in New Issue
Block a user