令牌身份验证模式

令牌身份验证模式

本文介绍了如何配置 Azure 通知中心以使用 APNS 令牌身份验证模式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用令牌作为身份验证模式在 Azure 通知中心添加 APNS 连接.

I am trying to add APNS connection in Azure Notification Hub with Token as authentication mode.

我已经四处搜索,但我无法在任何地方找到任何指南来完成这项工作.

I have searched around but I am not able to find any guides anywhere to make this work.

也许有人有一个指向指南的链接,其中显示了如何找到所需的信息?

Maybe someone has a link to a guide showing how to find the information needed?

我试图在 Apple 开发者控制台中创建一个APNs Auth Key",但这给了我一个 .p8 文件并且该文件中的令牌似乎不被接受,所以我想我需要在其他地方找到令牌.

I tried to create a "APNs Auth Key" in Apple developer console, but that gives me a .p8 file and the token inside that file does not seem to be accepted, so I guess I need to find the token somewhere else.

我希望有人提供设置指南的链接并找到所需的信息.

I hope someone have a link to a guide for setting this up and find the information needed.

推荐答案

更新(2018 年 4 月):@Krumelur 在评论中报告该博客文章已过时.查看他关于如何修复它以避免出错的建议.

Update (Apr 2018): @Krumelur reports in the comments that the blog article is out of date. Check out his suggestion on how to fix it to avoid getting errors.

更新(2017 年 6 月):现在有一篇关于 APNS 的基于令牌 (HTTP/2) 身份验证.

原始答案(2017 年 5 月):

基于令牌的身份验证和带有 APNS 的 HTTP/2 示例 是有关如何从您的 Apple 开发者帐户获取这些值的很好的分步指南.

Token Based Authentication and HTTP/2 Example with APNS is a good step by step guide of how to get those values from your Apple Developer Account.

  • Key ID 在 Azure 门户中就是上面示例中的 APNS_KEY_ID
  • App Name 在 Azure 门户中是你的应用名称
  • App ID 在 Azure 门户中是 TEAM_ID 在上面的示例中的内容
  • Token 在 Azure 门户中是上面示例中 APNS_AUTH_KEY 变量中引用的文件的内容
  • Key ID in Azure Portal is what APNS_KEY_ID is in the sample above
  • App Name in Azure Portal is your app name
  • App ID in Azure Portal is what TEAM_ID is in the sample above
  • Token in Azure Portal is the contents of the file referred to in APNS_AUTH_KEY variable in the sample above

不要忘记跟踪哪些密钥和令牌是沙盒的,哪些是生产端点的.

Do not forget to keep track which keys and tokens are sandbox and which are production endpoint ones.

这篇关于如何配置 Azure 通知中心以使用 APNS 令牌身份验证模式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-24 13:07