STORMPATH:令牌无效,因为 'issued at' 时间 (iat) 晚于当前服务器时间

STORMPATH : Token is invalid because the 'issued at' time (iat) is later than the current server time

我正在尝试将 Spring 安全性(在 Spring 引导之上)与 StormPath 集成。

一切正常,但一旦用户成功登录就会抛出以下错误:

Sat Feb 18 12:43:27 IST 2017
There was an unexpected error (type=Internal Server Error, status=500).
com.stormpath.sdk.resource.ResourceException: HTTP 400, Stormpath 10012 (https://docs.stormpath.com/rest/product-guide/latest/errors.html#error-10012), RequestId 7e042da0-f5a9-11e6-afb8-22000be1c7ec: Token is invalid because the 'issued at' time (iat: 2017-02-18T07:13:27.000Z) is later than the current server time (2017-02-18T07:12:39.000Z).

Error Documentation

但是在手动重定向到默认身份验证成功后 URL(在我的例子中它只是 http://localhost:8080),它成功地显示了注销按钮并且这也是有效的。

以下是目前的代码:

@Configuration
public class SecurityConfiguration extends WebSecurityConfigurerAdapter {
    @Override
    protected void configure(HttpSecurity http) throws Exception {
        http.apply(stormpath());
    }   
}

application.properties:

stormpath.client.apiKey.id = xxxx
stormpath.client.apiKey.secret = xxxxx

我还需要做什么来克服这个错误?

您提供的令牌似乎有错误的时间戳,它声称将在未来发行。

时差大约一分钟,所以当你手动尝试时,那一分钟已经过去了,这可能是手动重定向有效的原因。

我认为除了通知该服务的提供商调整他们的服务器时间之外,您无能为力。