增加了SSO,现在token也可以从query的token读入

This commit is contained in:
2026-05-04 15:35:47 +08:00
parent e3fc7db01c
commit fc7b38ac4e
8 changed files with 73 additions and 41 deletions
+3 -3
View File
@@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
using System.Text.Json;
using Microsoft.Extensions.Caching.Distributed;
using SimApi.Communications;
using StackExchange.Redis;
@@ -137,8 +136,9 @@ public class SimApiAuth(IDistributedCache cache, IConnectionMultiplexer redis)
{
var setCacheKey = TokenSetCacheKey.Replace("{userId}", item.Id);
_redisDb.SetRemove(setCacheKey, token);
var cacheKey = TokenCacheKey.Replace("{token}", token);
cache.Remove(cacheKey);
}
var cacheKey = TokenCacheKey.Replace("{token}", token);
cache.Remove(cacheKey);
}
}