Я следовал этому руководству:
https://dzone.com/articles/get-started-with-spring-boot-saml-and-okta
И сначала все работало хорошо. Но затем приложение входит в бесконечный цикл: в URL-адресе браузера оно перенаправляет на страницу входа Okta и наоборот. Когда я очищаю данные просмотра в Chrome, удаляя файлы cookie, все снова начинает работать нормально. Но после иногда снова поднимается бесконечный цикл. Вот некоторые части исключения:
2018-05-15 20:16:23.027 INFO 11136 --- [nio-8443-exec-1]
o.s.security.saml.log.SAMLDefaultLogger : AuthNResponse;FAILURE;0:0:0:0:0:0:0:1;https://localhost:8443/saml/metadata;http://www.okta.com/exkezd0f1qtnMMYy90h7;;;org.opensaml.common.SAMLException: Response doesn't have any valid assertion which would pass subject validation
at org.springframework.security.saml.websso.WebSSOProfileConsumerImpl.processAuthenticationResponse(WebSSOProfileConsumerImpl.java:229)
at org.springframework.security.saml.SAMLAuthenticationProvider.authenticate(SAMLAuthenticationProvider.java:82)
...
Caused by: org.springframework.security.authentication.CredentialsExpiredException: Authentication statement is too old to be used with value 2018-05-15T11:46:27.900Z
at org.springframework.security.saml.websso.WebSSOProfileConsumerImpl.verifyAuthenticationStatement(WebSSOProfileConsumerImpl.java:538)
at org.springframework.security.saml.websso.WebSSOProfileConsumerImpl.verifyAssertion(WebSSOProfileConsumerImpl.java:306)
at org.springframework.security.saml.websso.WebSSOProfileConsumerImpl.processAuthenticationResponse(WebSSOProfileConsumerImpl.java:214)
... 64 more
Пожалуйста помоги!