基于 APNS 令牌的多服务器身份验证

时间:2021-02-06 12:41:10

标签: ios apple-push-notifications pushy

我现在正在使用 pushy Java 库实现基于 APNS 令牌的身份验证,但 Apple 和 Pushy 的文档中有一个不清楚的部分。

我将有几个服务器使用基于令牌的身份验证发送推送通知。

让我烦恼的是 Apple 文档中的部分内容:

For security, APNs requires you to refresh your token regularly. Refresh your token no more than once every 20 minutes and no less than once every 60 minutes. APNs rejects any request whose token contains a timestamp that is more than one hour old. Similarly, APNs reports an error if you recreate your tokens more than once every 20 minutes. 

所以我担心的部分是“每 20 分钟不超过一次”。如果我有 4 个服务器,每个服务器每 50 分钟使用相同的签名密钥生成一个令牌,我会一直处于这个限制吗?除非此限制适用于每个 TLS 连接。 我是否必须构建一种跨服务器共享令牌的方法,如果可以,可以直接使用令牌配置 Pushy 吗?还是应该为每个服务器使用不同的签名密钥?

0 个答案:

没有答案