Closed cooperlyt closed 3 years ago
oh! just use this:
curl -X POST http://localhost:8081/auth/realms/$YOUR_REALM/protocol/openid-connect/token -H 'content-type: application/x-www-form-urlencoded' -d 'grant_type=password&phone_number=$PHONE_NUMBER&code=$VERIFICATION_CODE&client_id=$CLIENT_ID&client_secret=CLIENT_SECRECT'
client Access Type : confidential Service Accounts Enabled: on Authentication Flow Overrides - Direct Grant Flow: Direct grant with phone
in Keycloak 10.0.2
你好:
curl -X POST \ http://localhost:8081/auth/realms/$YOUR_REALM/protocol/openid-connect/token \ -H 'authorization: Basic c2h1bmRhby1hZG1pbjoxODc3MGYxMi02NjE4LTQwOTctYThmYi1kMjA0Mzg0Mzg4OTk=' \ -H 'content-type: application/x-www-form-urlencoded' \ -d 'grant_type=password&phone_number=$PHONE_NUMBER&code=$VERIFICATION_CODE'
此例中 authorization 是什么? 是怎么得来的? 另外参数中没有指定 client_id ?
是要把 client 的 Access Type 设置为 confidential , 先取得client 的 token 再运行这个吗?