首页 > 解决方案 > cosmos-auth 无法连接到 fiware-idm

问题描述

我已经在 fiware-idm 中注册了我的 cosmos-auth 应用程序,并且当我发送请求时:

curl -k -X POST " https://xxxx:13000/cosmos-auth/v1/token " -H "Content-Type: application/x-www-form-urlencoded" -d "grant_type=password&username=admin@test .com&密码=1234"

它抛出错误:{“statusCode”:500,“错误”:“内部服务器错误”,“消息”:“发生内部服务器错误”}

在 cosmos-auth 生成的日志:

信息:[用户 --> cosmos-auth] 请求:POST /cosmos-auth/v1/token 信息:[用户 --> cosmos-auth] {"user-agent":"curl/7.29.0","host ":"xxxx:13000","accept":" / ","content-type":"application/x-www-form-urlencoded","content-length":"57"} 信息:[用户 -- > cosmos-auth] grant_type=password&username=admin@test.com&password=1234 信息:[cosmos-auth -> IdM] 请求:POST https://xxxx:3004/oauth2/token info: [cosmos-auth -> IdM] {"Authorization":"基本 OGQ3NTI5MTYtZTJiOC00ZDJiLWI1YzEtMTA5OWNkYTQyMzk5OjZlNjhhMTI5LTc3NjQtNDk0MC04NzVmLTU1MzEwMTUxODI3MQ==","Content-Type":","-"codedLengthLength:57}-ur info:" [cosmos-auth -> IdM] grant_type=password&username=admin@test.com&password=1234 (node:3250) [DEP0005] DeprecationWarning: Buffer() 由于安全性和可用性问题而被弃用。请改用 Buffer.alloc()、Buffer.allocUnsafe() 或 Buffer.from() 方法。错误:无法连接到 IdM

请提供一些帮助?

标签: fiware-cosmos

解决方案


推荐阅读