|
@@ -162,14 +162,25 @@ namespace TEAMModelOS.Filter
|
|
|
if (!string.IsNullOrWhiteSpace(XAuthSchool))
|
|
|
{
|
|
|
var table = _azureStorage.GetCloudTableClient().GetTableReference("IESOpenApi");
|
|
|
- List<BusinessSchool> schools = table.FindListByDictSync<BusinessSchool>(new Dictionary<string, object> { { "PartitionKey", $"BusinessSchool-{id}" } });
|
|
|
+ List<BusinessSchool> schools = table.FindListByDictSync<BusinessSchool>(new Dictionary<string, object> { { "PartitionKey", $"BusinessSchool-{id}" } ,{ "RowKey",XAuthSchool } });
|
|
|
+ List<BusinessConfig> configs = table.FindListByDictSync<BusinessConfig>(new Dictionary<string, object> { { "PartitionKey", $"BusinessConfig" }, { "RowKey", id } });
|
|
|
+ //同时授权学校存在,且jti一致 ,验证jti原因在于 token轮换或刷新后,旧的token不能再使用。
|
|
|
+ if (schools.Any() && configs.Any())
|
|
|
+ {
|
|
|
+ if (configs[0].jti.Equals(jti)) {
|
|
|
+ pass = true;
|
|
|
+ school = XAuthSchool;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ pass = false;
|
|
|
+ }
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
pass = false;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
if (!string.IsNullOrEmpty(id) && !string.IsNullOrEmpty(school) && !string.IsNullOrEmpty(jti))
|
|
|
{
|
|
@@ -180,7 +191,6 @@ namespace TEAMModelOS.Filter
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
if (pass)
|
|
|
{
|