我想将 cosmos-auth 与 Idm GE 集成。node.js 应用程序的配置是:
{
"host": "192.168.4.180",
"port": 13000,
"private_key_file": "key.pem",
"certificate_file": "cert.pem",
"idm": {
"host": "192.168.4.33",
"port": "443",
"path": "/oauth2/token"
},
"cosmos_app": {
"client_id": "0434fdf60897479588c3c31cfc957b6d",
"client_secret": "a7c3540aa5de4de3a0b1c52a606b82df"
},
"log": {
"file_name": "/var/log/cosmos/cosmos-auth/cosmos-auth.log",
"date_pattern": ".dd-MM-yyyy"
}
}
当我将 HTTP POST 请求直接发送到 IDM GE 到 url
https://192.168.4.33:443/oauth2/token
使用所需的参数,我得到了好的结果:
{
access_token: "LyZT5DRGSn0F8IKqYU8EmRFTLo1iPJ"
token_type: "Bearer"
expires_in: 3600
refresh_token: "XiyfKCHrIVyludabjaCyGqVsTkx8Sf"
}
但是当我卷曲 cosmos-auth node.js 应用程序时
curl -X POST "https://192.168.4.180:13000/cosmos-auth/v1/token" -H
"Content-Type: application/x-www-form-urlencoded" -d
"grant_type=password&username=idm&password=idm" -k
我得到下一个结果:
{"statusCode":500,"error":"Internal Server Error","message":"An internal server error occurred"}
有没有人遇到过类似的事情?可能是什么问题呢?