我需要通过curl命令对管理员用户进行身份验证,以便可以在wso2中实用地添加,删除,修改用户
我可以调用api端点来为用户添加/修改/删除没有问题。但是,如果无法先对wso2进行身份验证,那将是徒劳的。当我发送curl命令时,没有任何响应,日志中也没有任何显示。
这是我的基本curl命令,直接在书中: curl -X POST“ https://xxxxxxx.com:9443/login/portal” -H“内容类型:application / x-form-urlencoded” -d“ username = uid&password = foo&grantType = password”
答案 0 :(得分:0)
您可以将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