hongming 感谢您的回复,我部署的是 kubesphere,我根据您的方法获取到了kubesphere api
访问的token,但似乎我用这个token来访问openpitrix api的时候,还是提示 401
请求:
curl -X GET “http://172.168.1.213:32180/v1/role?role_id=aaaa” -H “accept: application/json” -H “Authorization: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImFkbWluQGt1YmVzcGhlcmUuaW8iLCJpYXQiOjE1NzQ5Mjc2MDYsInVzZXJuYW1lIjoiYWRtaW4ifQ.4nC_68VW5Q5Olofsh8LuAX_8N4fTG4b0czGzjwMKTdo”
Response body
{
“error”: “auth failure”,
“code”: 16,
“message”: “auth failure”,
“details”: [
{
“@type”: “type.googleapis.com/openpitrix.ErrorDetail”,
“error_name”: “auth_failure”
}
]
}