[英]axios.post results in Bad request - grant_type:'client_credentials'
[英]Curl request for implicit grant type on fiware keyrock?
我想在fiware idm上發出隱式授權類型的curl請求。 我已經通過了官方文件的軟件idm-
https://fiware-idm.readthedocs.io/en/latest/oauth/oauth_documentation/index.html
隱含授權類型存在於fiware idm中,但在發出curl請求時會拋出以下錯誤:
{"error":"unsupported_grant_type"}
我的卷曲請求如下:
curl -X POST -H
"Authorization: Basic $(echo -n 56c32d7-c991-4da0-8b0a-018461ac583e6:0ec8898c-3bc7-12cd-8abd-0d6abgh01c56 | base64 -w 0)" --header "Content-Type: application/x-www-form-urlencoded" -d "grant_type=implicit&username=admin@test.com&password=1234" https://Keyrock_Host:Keyrock_Port/oauth2/token --insecure
有誰知道嗎?
您的請求正文不正確,您似乎正在傳遞密碼授予所需的數據而不是隱式授權 。
對於OAuth2中的隱式授權 ,您需要傳遞client-id
的token
或code
請求:
GET /oauth/authorize?
response_type=token&
client_id={{client-id}}&
state=xyz&
redirect_uri={{callback_url}}
這是應用程序本身請求訪問資源,並且已在IDM中注冊的client-id
和callback-url
ar的情況
看到:
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.