3

我的Cosmos 个人资料是:

IdM username:      <IDM_USERNAME>
Cosmos username:   <COSMOS_USERNAME>
Password:          <PASSWORD>
HDFS quota:        5
HDFS used:         0
Registration time: Fri Oct 23 2015 12:59:39 GMT+0200 (CEST)
Last access time:  0000-00-00 00:00:00

当我尝试使用 cUrl 获取有效令牌时:

curl -k -X POST "https://cosmos.lab.fiware.org:13000/cosmos-auth/v1/token" -H "Content-Type: application/x-www-form-urlencoded" -d "grant_type=password&username=<IDM_USERNAME>&password=<PASSWORD>"

我收到此错误消息:

{"error": {"message": "The request you have made requires authentication.", "code": 401, "title": "Unauthorized"}}

如何在 Cosmos 中获取有效的 oauth2 令牌?

4

1 回答 1

0

一切都在这里解释。请求令牌时,您必须同时使用您的 IdM 用户名和密码。Cosmos 密码仅用于 ssh 访问集群。

于 2015-10-27T07:24:05.403 回答