私はSpring OAuth2から始めています。これまでのところ、構成でアプリを保護できました。しかし、問題があります。私のクライアントは HTTP Basic Authorization をサポートしていません。
/oauth/token エンドポイントの HTTP 基本認証を無効にする方法はありますか? JSON 本文または要求ヘッダーで client_id と client_secret を送信したいと考えています。
私が働きたいカールの例:
curl -X POST -H "Content-Type: application/json" -d '{
"username": "user",
"password": "pass",
"grant_type": "password",
"client_id": "test-client-id",
"client_secret": "test-client-secret"
}' "http://localhost:9999/api/oauth/token"
また
curl -X POST -H "Content-Type: application/json" -H "X-Client-ID: test-client-id" -H "X-Client-Secret: test-client-secret" -d '{
"username": "user",
"password": "pass",
"grant_type": "password"
}' "http://localhost:9999/api/oauth/token"