【发布时间】:2017-02-18 07:19:59
【问题描述】:
我正在尝试将 Spring Security(在 Spring Boot 之上)与 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).
但是在手动重定向到默认的身份验证成功 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
我还需要做什么来克服这个错误?
【问题讨论】:
标签: spring-boot spring-security spring-security-oauth2 stormpath