OAuthAuthorizationServerProvider/ AuthenticationTokenProvider 服务器唯一的票证?

OAuthAuthorizationServerProvider/ AuthenticationTokenProvider ticket unique to server?

我们有一个 .Net Web API (v2) 服务于我打算使用 OAuth 2 保护的 SPA。

在我的 OWIN Startup.Configuration() 中,我将 IAppBuilder.UseOAuthAuthorizationServer 中的 Provider 设置为覆盖 OAuthAuthorizationServerProvider。我成功提供了刷新令牌。

我想确保这些令牌不会被实施类似提供程序的人欺骗。我所做的任何搜索都没有给我任何答案。

OAuthAuthorizationServerProvider 是否确保收到的刷新令牌是它自己发出的,而不是黑客机器上的任何类似代码?

我自己的实验似乎证实了这一点 - 我在两台不同的机器上尝试了相同的代码 运行 并从另一台机器上获取了未过期的刷新令牌(有效期为 24 小时),并且正如我所希望的那样得到了 401。但以防万一我错误地说服了自己,我想要一些比我更了解 .Net Web API 中的 OAuth 的人的保证和/或建议。

谢谢,

保罗

我确信我最终在 OAuthAuthorizationServerProvider 的文档中找到了明确的答案,但现在找不到了。

然而,这个领域的专家Dominick Baier说:

Access tokens are protected using the machine key. Protection of refresh tokens is up to you. You need to manually set the machineKey element in web.config (otherwise the key gets auto generated and might change over time).

他的评论来自对 post on implementing OAuthAuthorizationServerProvider 的回复。