여러 오류를 수신하는 스프링 부트로 StormPath를 통합하려고합니다. 다음은 응용 프로그램 설정입니다.StormPath 스프링 부트 통합 - 잘못된 CORS 요청 오류가 발생했습니다.
stormpath-default-spring-boot-starter 버전 1.2.1을 사용합니다.
1) application.properties contains only stormpath id, secret and href as follows,
stormpath.client.apiKey.id = <id>
stormpath.client.apiKey.secret = <secret>
stormpath.application.href = <href>
2) SpringSecurityWebAppConfig.Java (Override spring security)
@Configuration
public class SpringSecurityWebAppConfig extends WebSecurityConfigurerAdapter {
@Override
protected void configure(HttpSecurity http) throws Exception {
http.apply(stormpath());
}
}
When application is run,
------------------------
1) http://localhost:8080/register renders register screen.
2) http://localhost:8080/login (GET) throws error "Unable to invoke StormPath controller: Resolved account store cannot be an Organization".
3) http://localhost:8080/login (POST) (from PostMan) throws error "Invalid CORS request".
감사합니다.
# 2는 SDK v1.2.2로 업그레이드했지만 # 3은 여전히 오류가 발생했습니다. application.properties 파일에 stormpath.web.cors.enabled = false가 추가되었습니다. 이제 로그인 (POST)에서 "403, 금지됨, 사용 가능한 메시지 없음"오류가 발생합니다. 감사! – Faizal
안녕하세요 @Faizal, 403 답변을 듣고 죄송합니다. PostMan을 사용하고 있기 때문에 응답은 저장된 쿠키로 인해 발생합니다. 'LoginController'가 이미 인증 된 요청 (저장된 쿠키)에 대한 로그인 시도가 요청을 거부하면 403. 쿠키를 청소하거나 '컬 (curl)'과 같은 다른 클라이언트를 사용하여 문제를 해결할 수 있습니까? 고마워요 – jbarrueta
곱슬 곱슬하게 나는 PostMan (쿠키를 지웠다)와 함께 Post URL을 치지 못했습니다. – Faizal