mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-01 07:35:58 +08:00
fix: delete token by correct platformID && feat: adminToken can be retained for five minutes after deleting (#3313)
This commit is contained in:
+6
-1
@@ -1,8 +1,9 @@
|
||||
package cachekey
|
||||
|
||||
import (
|
||||
"github.com/openimsdk/protocol/constant"
|
||||
"strings"
|
||||
|
||||
"github.com/openimsdk/protocol/constant"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -13,6 +14,10 @@ func GetTokenKey(userID string, platformID int) string {
|
||||
return UidPidToken + userID + ":" + constant.PlatformIDToName(platformID)
|
||||
}
|
||||
|
||||
func GetTemporaryTokenKey(userID string, platformID int, token string) string {
|
||||
return UidPidToken + ":TEMPORARY:" + userID + ":" + constant.PlatformIDToName(platformID) + ":" + token
|
||||
}
|
||||
|
||||
func GetAllPlatformTokenKey(userID string) []string {
|
||||
res := make([]string, len(constant.PlatformID2Name))
|
||||
for k := range constant.PlatformID2Name {
|
||||
|
||||
Reference in New Issue
Block a user