JSON通信を完全に使用するspring/spring-mvcのアプリケーションがあります。ここで、JSON 経由で Spring Security 3 (LdapAuthenticationProvider を使用) でアプリケーションを認証する必要があります。
デフォルトのSpring Seurity送信フォームには、次のようなPOSTが必要です:
POST /myapp/j_spring_security_check HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: application/x-www-form-urlencoded
Content-Length: 32
Host: 127.0.0.1:8080
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)
j_username=myUsername&j_password=myPass
しかし、次のような JSON オブジェクトを渡したい:
{"j_username":"myUsername","j_password":"myPass"}
私はthis、this otherまたはthis oneのような多くの投稿を読みましたが、すべての ajax ケースで上記のような POST が行われます。
何か案は?