广播聊天
This commit is contained in:
@@ -52,4 +52,19 @@ public static class GateUnitManageComponentSystem
|
||||
unit.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 回话迭代器
|
||||
/// </summary>
|
||||
/// <param name="self"></param>
|
||||
/// <returns></returns>
|
||||
public static IEnumerable<Session> ForEachUnitSession(this GateUnitManageComponent self)
|
||||
{
|
||||
foreach (var (_, gateUnit) in self.Units)
|
||||
{
|
||||
Session gateSession = gateUnit.Session;
|
||||
if (gateSession == null) continue;
|
||||
yield return gateSession;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -28,8 +28,8 @@ public static class GateJWTComponentSystem
|
||||
ValidateIssuer = true, // 验证发行者
|
||||
ValidateAudience = true, // 验证受众
|
||||
ValidateIssuerSigningKey = true, // 验证签名密钥
|
||||
ValidIssuer = "Fantasy", // 有效的发行者
|
||||
ValidAudience = "Fantasy", // 有效的受众
|
||||
ValidIssuer = "NoBug", // 有效的发行者
|
||||
ValidAudience = "NoBug", // 有效的受众
|
||||
IssuerSigningKey = new RsaSecurityKey(rsa) // RSA公钥作为签名密钥
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user