【问题标题】:Where to obtain public key for GameCenter 3rd party authentication on a server在哪里获取服务器上 GameCenter 3rd 方身份验证的公钥
【发布时间】:2016-07-02 02:13:03
【问题描述】:

什么是获取苹果公钥的url?

这个不行:https://sandbox.gc.apple.com/public-key/gc-sb-2.cer

我只找到了这样的 url 由客户端本身传递的示例:

How to authenticate the GKLocalPlayer on my 'third party server'?

记录方式如下: https://developer.apple.com/library/ios/documentation/GameKit/Reference/GKLocalPlayer_Ref/index.html#//apple_ref/doc/uid/TP40009587-CH1-SW25

  1. 将 publicKeyURL、签名、盐和时间戳参数发送到用于身份验证的第三方服务器。
  2. 使用第三方服务器上的 publicKeyURL 下载公钥。

出于安全原因,我当然不能使用它。

【问题讨论】:

    标签: ios security authentication game-center


    【解决方案1】:

    为了避免 CSRF 攻击,我只需使用 uri.DnsSafeHost.EndsWith(".gc.apple.com", StringComparison.OrdinalIgnoreCase) 检查 url。

    【讨论】:

      【解决方案2】:

      我不明白这个问题。您从对 generateIdentityVerificationSignatureWithCompletionHandler 的调用中获取 URL。我自己没有这样做,但我猜你在你的应用程序中调用了那个函数,然后你得到了其他东西中的 URL。您将其发送到您的服务器,然后服务器可以按照https://developer.apple.com/library/ios/documentation/GameKit/Reference/GKLocalPlayer_Ref/index.html#//apple_ref/doc/uid/TP40009587-CH1-SW25 中所述验证用户的身份验证

      URL 不是常量,尽管可能是伪常量。您应使用传递给您的 URL。

      【讨论】:

        猜你喜欢
        • 2020-11-16
        • 1970-01-01
        • 1970-01-01
        • 2011-03-29
        • 2016-09-22
        • 2021-12-14
        • 2021-08-14
        • 1970-01-01
        • 2012-12-09
        相关资源
        最近更新 更多