Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个使用 oAuth 进行身份验证的 API。几个月来一切都顺利进行,直到上周我开始注意到 oAuth400由于Expired timestamp, yours X, ours Y.
400
Expired timestamp, yours X, ours Y
我猜服务器(它是共享主机)上的一些更改会重置或弄乱当地时间。
我想不出任何其他原因,但我想知道是否有任何其他调试技术可以帮助我。
PS:使用 PHP 5.2 和 oAuth 1.0a php 实现
OAuth 服务器应始终使用 UTC 时间作为检查时间戳的基础。假设您发送了基于 UTC 的正确时间戳,请检查“我们的”时间戳是否具有正确的 UTC 时间。如果不是,那么很可能是服务器时间或服务器上的 OAuth 时间戳计算存在问题。