簡體   English   中英

wso2 通過 curl 進行用戶身份驗證

[英]user authentication in wso2 via curl

我需要通過 curl 命令對管理員用戶進行身份驗證,以便我可以務實地添加、刪除、修改 wso2 中的用戶

我可以調用 api 端點為用戶添加/修改/刪除沒問題。 但是如果無法首先向 wso2 進行身份驗證,這一切都是徒勞的。 當我發送 curl 命令時,我沒有收到任何回復,日志中也沒有任何顯示。

This is my basic curl command, right out of the books: curl -X POST " https://xxxxxxx.com:9443/login/portal " -H "Content-Type: application/x-form-urlencoded" -d "用戶名=uid&密碼=foo&grantType=密碼"

您可以使用具有基本身份驗證的 SCIM API 來管理用戶。

如果您想使用 OAuth2 令牌,您可以像這樣獲取它們。

curl -k -d "grant_type=password&username=<username>&password=<password>" 
    -u <Consumer_key>:<Consumer_secret> 
    -H "Content-Type: application/x-www-form-urlencoded" 
    https://localhost:9443/oauth2/token

[1] https://docs.wso2.com/display/IS530/SCIM+1.1+APIs

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM