简体   繁体   English

Fiware Keystone API创建用户

[英]Fiware Keystone API Create User

We are trying to create users in Fiware IDM using Keystone Identity API. 我们正在尝试使用Keystone Identity API在Fiware IDM中创建用户。

We are sending the following curl command 我们正在发送以下curl命令

curl -s \
 -H "X-Auth-Token: e746971040657101bb1e" \
 -H "Content-Type: application/json" \
 -d '{"user": {"name": "newuser", "password": "changeme"}}' \
 http://localhost:35357/v3/users | python -mjson.tool

The token we have used is the one configured in keystone.conf 我们使用的令牌是在keystone.conf中配置的令牌

admin_token=e746971040657101bb1e

But the result we are getting is the following 但是我们得到的结果如下

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

Does anyone have an idea about what can happen? 有谁知道会发生什么?

A couple of ideas for you. 给您一些想法。

One is that the port value 35357 is not for the admin API calls, it's intended for user calls. 一种是端口值35357不适用于admin API调用,而是用于用户调用。

Also since you are using the v3 API I believe that the token can't be used when creating a user unless you are indicating a domain. 另外,由于您使用的是v3 API,因此除非您指定域,否则我相信创建用户时不能使用令牌。

However I can't tell from your curl command what action you are trying to do. 但是,我无法从curl命令中得知您要执行的操作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM