simple auth

curl -i 'http://193.160.15.13:5000/v2.0/tokens' -X POST -H "Content-Type: application/json" -H "Accept: application/json"  -d '{"auth": {"tenantName": "admin", "passwordCredentials": {"username": "admin", "password": "fnst1234"}}}'

curl -i 'http://193.160.15.13:35357/v3/auth/tokens' -X POST -H "Content-Type: application/json" -H "Accept: application/json" -d '{"auth":{"identity":{"methods":["password"],"password":{"user":{"id":"bd456da75a784a0686eeebfd7627101e","password":"fnst1234"}}},"scope":{"project":{"id":"70bbb7ea3797467d86c0793e1289d86a"}}}}'

curl -i 'http://controller:35357/v3/users/bd456da75a784a0686eeebfd7627101e/projects' -X GET -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: $token"

 

你可能感兴趣的:(simple auth)