forked from docs/doc-exports
Reviewed-by: gtema <artem.goncharov@gmail.com> Co-authored-by: zhangyue <zhangyue164@huawei.com> Co-committed-by: zhangyue <zhangyue164@huawei.com>
322 lines
27 KiB
HTML
322 lines
27 KiB
HTML
<a name="en-us_topic_0057845585"></a><a name="en-us_topic_0057845585"></a>
|
|
|
|
<h1 class="topictitle1">Verifying a Token and Returning a Valid Token</h1>
|
|
<div id="body1559206849815"><div class="section" id="en-us_topic_0057845585__s2f7665a32abf4492987e6dd3617bcb21"><h4 class="sectiontitle">Function</h4><p id="en-us_topic_0057845585__affc0cd1844644279ac4dd958af66b459">This API is used to check the validity of a specified token. If the token is valid, detailed information about the token will be returned.</p>
|
|
</div>
|
|
<div class="section" id="en-us_topic_0057845585__s1c0fd353ed38459c8baeab25cc3c62d2"><h4 class="sectiontitle">URI</h4><p id="en-us_topic_0057845585__p47072595171737">GET /v3/auth/tokens</p>
|
|
</div>
|
|
<div class="section" id="en-us_topic_0057845585__s27bb6347561e424096c86cfc3d036e9e"><h4 class="sectiontitle">Request Parameters</h4><ul id="en-us_topic_0057845585__u6f48fb0c8ad9498dad047c260e363a64"><li id="en-us_topic_0057845585__l19a56023fd914b7dbfe3816275474144">Parameters in the request header
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0057845585__t14a8c0fedd2149129bd965b2a4d51c90" frame="border" border="1" rules="all"><thead align="left"><tr id="en-us_topic_0057845585__rc0444c4b152b43768b629e845d90495e"><th align="left" class="cellrowborder" valign="top" width="19.038096190380962%" id="mcps1.3.3.2.1.1.1.5.1.1"><p id="en-us_topic_0057845585__a293da93d33fc404ea05b069800a7eb13">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="17.578242175782425%" id="mcps1.3.3.2.1.1.1.5.1.2"><p id="en-us_topic_0057845585__ac06ad3b3b5174f3ebd57a1661506970a">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="16.75832416758324%" id="mcps1.3.3.2.1.1.1.5.1.3"><p id="en-us_topic_0057845585__a924a03bda76a46648797189b78bdd715">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="46.62533746625338%" id="mcps1.3.3.2.1.1.1.5.1.4"><p id="en-us_topic_0057845585__ab17a839c16b94f1e83ff3a3f8ef3b308">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="en-us_topic_0057845585__r6f5a057d2e2a48b6b1a71318684ba8b5"><td class="cellrowborder" valign="top" width="19.038096190380962%" headers="mcps1.3.3.2.1.1.1.5.1.1 "><p id="en-us_topic_0057845585__a927ddf565a2f45c0840a6e4ef3eab536">X-Auth-Token</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.578242175782425%" headers="mcps1.3.3.2.1.1.1.5.1.2 "><p id="en-us_topic_0057845585__a4edeb0b0c00144319701c1460d210ea8">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16.75832416758324%" headers="mcps1.3.3.2.1.1.1.5.1.3 "><p id="en-us_topic_0057845585__a17c7fa87e9a54833a6064feb297b5e55">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="46.62533746625338%" headers="mcps1.3.3.2.1.1.1.5.1.4 "><ul id="en-us_topic_0057845585__ul1963814299291"><li id="en-us_topic_0057845585__li176391829162917">To verify your own token, specify your token. There are no special requirements on the permissions that your token must have.</li><li id="en-us_topic_0057845585__li11639192962916">To verify the token of another user under the same domain, use a token that has permissions of the <strong id="en-us_topic_0057845585__b2069775420254">Security Administrator</strong> policy.</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="en-us_topic_0057845585__r4ebaddfb83fe4bffa462094cc2834cf2"><td class="cellrowborder" valign="top" width="19.038096190380962%" headers="mcps1.3.3.2.1.1.1.5.1.1 "><p id="en-us_topic_0057845585__ae9df07c230354205b9c3cb76f08eadb4">X-Subject-Token</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.578242175782425%" headers="mcps1.3.3.2.1.1.1.5.1.2 "><p id="en-us_topic_0057845585__a1100e03a09864240abecdff29c388bf8">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16.75832416758324%" headers="mcps1.3.3.2.1.1.1.5.1.3 "><p id="en-us_topic_0057845585__a667fee7780224b0d9e78b40c59beaccf">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="46.62533746625338%" headers="mcps1.3.3.2.1.1.1.5.1.4 "><p id="en-us_topic_0057845585__p956292518331">Token to be verified.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li><li id="en-us_topic_0057845585__l16da9f6427ff4f269d5e9e98935c7074">Query parameters
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0057845585__tb63966ba606d4ce4b360f40a653abff8" frame="border" border="1" rules="all"><thead align="left"><tr id="en-us_topic_0057845585__re1669fb2a3c9480bb3a00c0dd34cfc26"><th align="left" class="cellrowborder" valign="top" width="18.891889188918892%" id="mcps1.3.3.2.2.1.1.5.1.1"><p id="en-us_topic_0057845585__ad1f8f00641de4d56931fab6c023ee27c">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="17.64176417641764%" id="mcps1.3.3.2.2.1.1.5.1.2"><p id="en-us_topic_0057845585__a7a0e922d4ac64a23a8ee0149912e026c">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="17.581758175817583%" id="mcps1.3.3.2.2.1.1.5.1.3"><p id="en-us_topic_0057845585__a3fca62cae08b4adcaba323f7f3ad866e">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="45.88458845884588%" id="mcps1.3.3.2.2.1.1.5.1.4"><p id="en-us_topic_0057845585__a0cfd690722644009b8bc0cb94a5a9327">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="en-us_topic_0057845585__rd8377b31aedb40a6ac2c78ec645295bb"><td class="cellrowborder" valign="top" width="18.891889188918892%" headers="mcps1.3.3.2.2.1.1.5.1.1 "><p id="en-us_topic_0057845585__ab3f196e612a04b36898fca5391c8c71c">nocatalog</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.64176417641764%" headers="mcps1.3.3.2.2.1.1.5.1.2 "><p id="en-us_topic_0057845585__ab701027c99914d0aa8bb847a8df6dd5e">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.581758175817583%" headers="mcps1.3.3.2.2.1.1.5.1.3 "><p id="en-us_topic_0057845585__a5fee45d14b11467e90c3ae4231a1c771">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="45.88458845884588%" headers="mcps1.3.3.2.2.1.1.5.1.4 "><p id="en-us_topic_0057845585__a2c20ed7477cd4f059a3ea425cc7371d0">If this parameter is set, no catalog information will be displayed in the response.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li><li id="en-us_topic_0057845585__l8e4285d4fa9a436db2f75be29fe6c522">Example request<pre class="screen" id="en-us_topic_0057845585__s4e1093936ad24a10a794355debb4aa19">curl -i -k -H "X-Auth-Token:$token" -H "X-Subject-Token:$token" -X GET https://sample.domain.com/v3/auth/tokens</pre>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="en-us_topic_0057845585__sef91e8b0ca524132ac01532b7965e1e2"><h4 class="sectiontitle">Response Parameters</h4><ul id="en-us_topic_0057845585__u71eea00034a24d8188eee3d532db9499"><li id="en-us_topic_0057845585__li1413397214268">Parameters in the response header
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0057845585__table44659654142645" frame="border" border="1" rules="all"><thead align="left"><tr id="en-us_topic_0057845585__row41981888142645"><th align="left" class="cellrowborder" valign="top" width="19.2019201920192%" id="mcps1.3.4.2.1.1.1.5.1.1"><p id="en-us_topic_0057845585__p45089776142645">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="17.17171717171717%" id="mcps1.3.4.2.1.1.1.5.1.2"><p id="en-us_topic_0057845585__p28393220142645">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="17.791779177917793%" id="mcps1.3.4.2.1.1.1.5.1.3"><p id="en-us_topic_0057845585__p18149477142645">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="45.83458345834583%" id="mcps1.3.4.2.1.1.1.5.1.4"><p id="en-us_topic_0057845585__p60821498142645">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="en-us_topic_0057845585__row3444779142645"><td class="cellrowborder" valign="top" width="19.2019201920192%" headers="mcps1.3.4.2.1.1.1.5.1.1 "><p id="en-us_topic_0057845585__p10591684142645">X-Subject-Token</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.17171717171717%" headers="mcps1.3.4.2.1.1.1.5.1.2 "><p id="en-us_topic_0057845585__p52620110142645">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.791779177917793%" headers="mcps1.3.4.2.1.1.1.5.1.3 "><p id="en-us_topic_0057845585__p34370545142645">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="45.83458345834583%" headers="mcps1.3.4.2.1.1.1.5.1.4 "><p id="en-us_topic_0057845585__p669852604310">Verified token.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li><li id="en-us_topic_0057845585__l204c991514c74542a45e6df0f7328ca6">Parameters in the response body
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0057845585__t6d4ee42e5c8f4f45a85c17438155d3b2" frame="border" border="1" rules="all"><thead align="left"><tr id="en-us_topic_0057845585__r4dd86b94125f407290b7fbf04ebe575c"><th align="left" class="cellrowborder" valign="top" width="19.46%" id="mcps1.3.4.2.2.1.1.5.1.1"><p id="en-us_topic_0057845585__a75d1f5112a70466ea4a5fe938cdf3cc8">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="17.29%" id="mcps1.3.4.2.2.1.1.5.1.2"><p id="en-us_topic_0057845585__p1558020561015">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="17.549999999999997%" id="mcps1.3.4.2.2.1.1.5.1.3"><p id="en-us_topic_0057845585__a7f33afb2227d4868b46829a830191f0c">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="45.7%" id="mcps1.3.4.2.2.1.1.5.1.4"><p id="en-us_topic_0057845585__aebca98d4b7494a6982128fb9f0efd2e1">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="en-us_topic_0057845585__r1e0a4bf8450b490197d5e660b327b925"><td class="cellrowborder" valign="top" width="19.46%" headers="mcps1.3.4.2.2.1.1.5.1.1 "><p id="en-us_topic_0057845585__a9765f37463df4bc79062f17565117cd7">token</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.29%" headers="mcps1.3.4.2.2.1.1.5.1.2 "><p id="en-us_topic_0057845585__p175801156906">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.549999999999997%" headers="mcps1.3.4.2.2.1.1.5.1.3 "><p id="en-us_topic_0057845585__ac3168808fa994c8a848af4ec4c54d5a6">Object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="45.7%" headers="mcps1.3.4.2.2.1.1.5.1.4 "><p id="en-us_topic_0057845585__aaaa91a281c0245f1bdfbd2263749ab43">Token information list.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ul>
|
|
<ul id="en-us_topic_0057845585__u69faa58de4f84fd78bb833e78587cd8f"><li id="en-us_topic_0057845585__l552202792eb2493cbcecdc066031c0cb">Token format description
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0057845585__tffc982d330f64c9ca0256e3a5e4ff5e7" frame="border" border="1" rules="all"><thead align="left"><tr id="en-us_topic_0057845585__r5697a7ee0b854dde9ecbfdd51d69ef0c"><th align="left" class="cellrowborder" valign="top" width="19.21%" id="mcps1.3.4.3.1.1.1.5.1.1"><p id="en-us_topic_0057845585__aa3e27da3347d4f8facd0ce9d0e632ab9">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="17.52%" id="mcps1.3.4.3.1.1.1.5.1.2"><p id="en-us_topic_0057845585__aead6892df91b4ede8f01e2eeb9df755a">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="17.86%" id="mcps1.3.4.3.1.1.1.5.1.3"><p id="en-us_topic_0057845585__a0bf1309201174445b94b761f3bdaffaf">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="45.410000000000004%" id="mcps1.3.4.3.1.1.1.5.1.4"><p id="en-us_topic_0057845585__add9e6449174841be9ef13474f307936e">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="en-us_topic_0057845585__rdb8b4121e4744630bf355a40cd5ebf95"><td class="cellrowborder" valign="top" width="19.21%" headers="mcps1.3.4.3.1.1.1.5.1.1 "><p id="en-us_topic_0057845585__a48286c452efa4c288e2a15a31254e63b">methods</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.52%" headers="mcps1.3.4.3.1.1.1.5.1.2 "><p id="en-us_topic_0057845585__a7285bdf185e84758a9a0ecfa2ea64151">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.86%" headers="mcps1.3.4.3.1.1.1.5.1.3 "><p id="en-us_topic_0057845585__a7f8b4e429f8c4fab8ac7174ae0791872">Array</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="45.410000000000004%" headers="mcps1.3.4.3.1.1.1.5.1.4 "><p id="en-us_topic_0057845585__a4e4d91d08dab407fa7c7afae3b845216">Method of obtaining the token, for example, <strong id="en-us_topic_0057845585__b35616331285">password</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="en-us_topic_0057845585__r2400a775e1b5496ca08cc5db1ffb1c49"><td class="cellrowborder" valign="top" width="19.21%" headers="mcps1.3.4.3.1.1.1.5.1.1 "><p id="en-us_topic_0057845585__ac2344fb8014b4dc0ad27b9f34cb41ffb">expires_at</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.52%" headers="mcps1.3.4.3.1.1.1.5.1.2 "><p id="en-us_topic_0057845585__a2071411444684e1295c813a9e8212725">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.86%" headers="mcps1.3.4.3.1.1.1.5.1.3 "><p id="en-us_topic_0057845585__a9327addec5014201af1c7c660651ea56">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="45.410000000000004%" headers="mcps1.3.4.3.1.1.1.5.1.4 "><p id="en-us_topic_0057845585__a6c7c4e6c2940430abd01290f42a71992">Expiration date of the token.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="en-us_topic_0057845585__r832448ca9e6b4a8fbd31107844e367f2"><td class="cellrowborder" valign="top" width="19.21%" headers="mcps1.3.4.3.1.1.1.5.1.1 "><p id="en-us_topic_0057845585__a9cf8f6059e1640e698466d21b30a650e">issued_at</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.52%" headers="mcps1.3.4.3.1.1.1.5.1.2 "><p id="en-us_topic_0057845585__a65e402777c14464e9fd409f9febe5449">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.86%" headers="mcps1.3.4.3.1.1.1.5.1.3 "><p id="en-us_topic_0057845585__ae1066225c9364795a0d584e27e47625c">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="45.410000000000004%" headers="mcps1.3.4.3.1.1.1.5.1.4 "><p id="en-us_topic_0057845585__en-us_topic_0031136109_p532161155713">Time when the token was issued.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="en-us_topic_0057845585__re3fd3f96adb04f4f8a61fa9416666cf6"><td class="cellrowborder" valign="top" width="19.21%" headers="mcps1.3.4.3.1.1.1.5.1.1 "><p id="en-us_topic_0057845585__a1e60825270834834bffc89c1a5b12302">user</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.52%" headers="mcps1.3.4.3.1.1.1.5.1.2 "><p id="en-us_topic_0057845585__a1fa84a4af2694a9aba3535e6b5d1a4bd">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.86%" headers="mcps1.3.4.3.1.1.1.5.1.3 "><p id="en-us_topic_0057845585__a24ae3bfbf525477ab52df4dda58371b3">Object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="45.410000000000004%" headers="mcps1.3.4.3.1.1.1.5.1.4 "><p id="en-us_topic_0057845585__aa091f76473d84b0990d9ebe12bdb8d58">Example:</p>
|
|
<pre class="screen" id="en-us_topic_0057845585__s5f7a0bf572bb482c992d7938df2ad417">"user": {
|
|
"name": "<em id="en-us_topic_0057845585__a7637d31b94164601bffca012a08f28f3">username</em>",
|
|
"id": "<em id="en-us_topic_0057845585__en-us_topic_0031136109_i433336816519">userid</em>",
|
|
"password_expires_at":"2016-11-06T15:32:17.000000",
|
|
"domain": {
|
|
"name": "<em id="en-us_topic_0057845585__en-us_topic_0031136109_i438354691645">domainname</em>",
|
|
"id": "<em id="en-us_topic_0057845585__en-us_topic_0031136109_i75268851664">domainid</em>"
|
|
}
|
|
}</pre>
|
|
<ul id="en-us_topic_0057845585__ul5441119421"><li id="en-us_topic_0057845585__li164417112428"><strong id="en-us_topic_0057845585__b18525043132816">user.name</strong>: Name of the user that owns the token.</li><li id="en-us_topic_0057845585__li14441116429"><strong id="en-us_topic_0057845585__b19460350162817">user.id</strong>: ID of the user.</li><li id="en-us_topic_0057845585__li644113113422"><strong id="en-us_topic_0057845585__b266416917292">domain.name</strong>: Name of the domain to which the user belongs.</li><li id="en-us_topic_0057845585__li1644110116428"><strong id="en-us_topic_0057845585__b2373202662920">domain.id</strong>: ID of the domain.</li><li id="en-us_topic_0057845585__li1444114118429"><strong id="en-us_topic_0057845585__b1662172810293">password_expires_at</strong>: Time when the password will expire. <strong id="en-us_topic_0057845585__b966317286299">null</strong> indicates that the password will not expire. This parameter is optional.</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="en-us_topic_0057845585__rd2b813ad52484c1bb6f776faff41f24e"><td class="cellrowborder" valign="top" width="19.21%" headers="mcps1.3.4.3.1.1.1.5.1.1 "><p id="en-us_topic_0057845585__a60103a37eec2447f91f0b5c1be69e796">domain</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.52%" headers="mcps1.3.4.3.1.1.1.5.1.2 "><p id="en-us_topic_0057845585__ab3872b16cb6b43dc9859c6d47b23753f">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.86%" headers="mcps1.3.4.3.1.1.1.5.1.3 "><p id="en-us_topic_0057845585__adf0c78cdfb4443b7bfe893e568cf6e3c">Object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="45.410000000000004%" headers="mcps1.3.4.3.1.1.1.5.1.4 "><p id="en-us_topic_0057845585__a62354a3d06f44ba0b35920a8960377b8">The system determines whether to return this field based on the scope contained in the request for obtaining the token.</p>
|
|
<p id="en-us_topic_0057845585__a4851306d5e804606a8d6ff1fe676ffe2">Example:</p>
|
|
<pre class="screen" id="en-us_topic_0057845585__s5ff3f88773fa485ba0fbd9f0ec9f4e87">"domain": {
|
|
"name" : "domainame",
|
|
"id" : "domainid"
|
|
}</pre>
|
|
<ul id="en-us_topic_0057845585__ul42892719426"><li id="en-us_topic_0057845585__li1528977174214"><strong id="en-us_topic_0057845585__b948315019309">domain.name</strong>: Domain name.</li><li id="en-us_topic_0057845585__li22891175423"><strong id="en-us_topic_0057845585__b1281179173016">domain.id</strong>: Domain ID.</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="en-us_topic_0057845585__r49eebdc20c3447e79e97f36423ae5934"><td class="cellrowborder" valign="top" width="19.21%" headers="mcps1.3.4.3.1.1.1.5.1.1 "><p id="en-us_topic_0057845585__a4a2c41d7a9e34398b44bd36829e6e527">project</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.52%" headers="mcps1.3.4.3.1.1.1.5.1.2 "><p id="en-us_topic_0057845585__abc19800d1e1247d4ba54fe02645b0912">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.86%" headers="mcps1.3.4.3.1.1.1.5.1.3 "><p id="en-us_topic_0057845585__ae5b0fdbdc9de485ba9ee16c4541a3d8f">Object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="45.410000000000004%" headers="mcps1.3.4.3.1.1.1.5.1.4 "><p id="en-us_topic_0057845585__a2659a34f291f467e8b5bf2d33f15129c">The system determines whether to return this field based on the scope contained in the request for obtaining the token.</p>
|
|
<p id="en-us_topic_0057845585__a62446cb5fca746d3824fe1d43530eefb">Example:</p>
|
|
<pre class="screen" id="en-us_topic_0057845585__s4c5b7b8fc0394e61817577d5049359db">"project": {
|
|
"name": "<em id="en-us_topic_0057845585__a7730a018d3ea40d0ac223462281202e4">projectname</em>",
|
|
"id": "<em id="en-us_topic_0057845585__en-us_topic_0031136109_i86520761696">projectid</em>",
|
|
}</pre>
|
|
<ul id="en-us_topic_0057845585__ul16649104334215"><li id="en-us_topic_0057845585__li1864915437420"><strong id="en-us_topic_0057845585__b1232142083011">project.name</strong>: Name of a project.</li><li id="en-us_topic_0057845585__li965004334217"><strong id="en-us_topic_0057845585__b967662223015">project.id</strong>: ID of the project.</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="en-us_topic_0057845585__row147105584397"><td class="cellrowborder" valign="top" width="19.21%" headers="mcps1.3.4.3.1.1.1.5.1.1 "><p id="en-us_topic_0057845585__p22717013113628">catalog</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.52%" headers="mcps1.3.4.3.1.1.1.5.1.2 "><p id="en-us_topic_0057845585__p54936595113628">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.86%" headers="mcps1.3.4.3.1.1.1.5.1.3 "><p id="en-us_topic_0057845585__p46529556113628">Json Array</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="45.410000000000004%" headers="mcps1.3.4.3.1.1.1.5.1.4 "><p id="en-us_topic_0057845585__p45368001113628">Endpoint information.</p>
|
|
<p id="en-us_topic_0057845585__p50787600113939">Example:</p>
|
|
<pre class="screen" id="en-us_topic_0057845585__screen19141143191815">"catalog": [{
|
|
"type": "identity",
|
|
"id": "1331e5cff2a74d76b03da1225910e31d",
|
|
"name": "iam",
|
|
"endpoints": [{
|
|
"url": "<em id="en-us_topic_0057845585__i1552310612311">https://sample.domain.com</em>/v3",
|
|
"region": "*",
|
|
"region_id": "*",
|
|
"interface": "public",
|
|
"id": "089d4a381d574308a703122d3ae738e9"
|
|
}]
|
|
}]</pre>
|
|
<ul id="en-us_topic_0057845585__ul243124664420"><li id="en-us_topic_0057845585__li114314684416"><strong id="en-us_topic_0057845585__b112631933103018">type</strong>: Type of the service to which the API belongs.</li><li id="en-us_topic_0057845585__li159252064510"><strong id="en-us_topic_0057845585__b14577193511303">id</strong>: ID of the service.</li><li id="en-us_topic_0057845585__li127961231114914"><strong id="en-us_topic_0057845585__b1450714014308">name</strong>: Name of the service.</li><li id="en-us_topic_0057845585__li14683123154614"><strong id="en-us_topic_0057845585__b10141104203012">endpoints</strong>: Endpoints that can be used to call the API.</li><li id="en-us_topic_0057845585__li1380613358453"><strong id="en-us_topic_0057845585__b193931144143014">url</strong>: URL used to call the API.</li><li id="en-us_topic_0057845585__li199891019184719"><strong id="en-us_topic_0057845585__b1282215811327">region</strong>: Region in which the service can be accessed.</li><li id="en-us_topic_0057845585__li1717451419506"><strong id="en-us_topic_0057845585__b1485219916329">region_id</strong>: ID of the region.</li><li id="en-us_topic_0057845585__li196428513471"><strong id="en-us_topic_0057845585__b19999051445">interface</strong>: Type of the API. The value <strong id="en-us_topic_0057845585__b2015526413">public</strong> means that the API is open for access.</li><li id="en-us_topic_0057845585__li1885414118505"><strong id="en-us_topic_0057845585__b15205101583210">id</strong>: ID of the API.</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="en-us_topic_0057845585__r76860dcda39c46a9b78f96428dcbcb14"><td class="cellrowborder" valign="top" width="19.21%" headers="mcps1.3.4.3.1.1.1.5.1.1 "><p id="en-us_topic_0057845585__a86671885064746d781a2d581f1f7826c">roles</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.52%" headers="mcps1.3.4.3.1.1.1.5.1.2 "><p id="en-us_topic_0057845585__ae1c2c67daddd401abc13d680e5cda5ee">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.86%" headers="mcps1.3.4.3.1.1.1.5.1.3 "><p id="en-us_topic_0057845585__a1b25331d8f1e4e65bacbc840dae50aed">Array</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="45.410000000000004%" headers="mcps1.3.4.3.1.1.1.5.1.4 "><p id="en-us_topic_0057845585__a4046ff35c37e405c91f599bfafe3d182">Permissions information of the token.</p>
|
|
<p id="en-us_topic_0057845585__a901e55a86b2448cab20381e6d06fc7fc">Example:</p>
|
|
<pre class="screen" id="en-us_topic_0057845585__s120c9eb390ab48df8b849e94fa1a2d1c">"roles" : [{
|
|
"name" : "role1",
|
|
"id" : "roleid1"
|
|
}, {
|
|
"name" : "role2",
|
|
"id" : "roleid2"
|
|
}
|
|
] </pre>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li><li id="en-us_topic_0057845585__lbc7115e5ab1249f2b152ab5090e54610">Example response<pre class="screen" id="en-us_topic_0057845585__screen9242193513180">{
|
|
"token" : {
|
|
"methods" : ["password"],
|
|
"expires_at" : "2015-11-09T01:42:57.527363Z",
|
|
"issued_at" : "2015-11-09T00:42:57.527404Z",
|
|
"user" : {
|
|
"domain" : {
|
|
"id" : "default",
|
|
"name" : "Default"
|
|
},
|
|
"id" : "ee4dfb6e5540447cb3741905149XXX...",
|
|
"password_expires_at":"2016-11-06T15:32:17.000000",
|
|
"name" : "admin"
|
|
},
|
|
"domain" : {
|
|
"name" : "Default",
|
|
"id" : "default"
|
|
},
|
|
"roles" : [{
|
|
"name" : "role1",
|
|
"id" : "roleid1"
|
|
}, {
|
|
"name" : "role2",
|
|
"id" : "roleid2"
|
|
}
|
|
]
|
|
}
|
|
}</pre>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="en-us_topic_0057845585__s5f49b0a31dfd4c0ba72af9d16199f092"><h4 class="sectiontitle">Status Codes</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="en-us_topic_0057845585__en-us_topic_0031136109_table25927028" frame="border" border="1" rules="all"><thead align="left"><tr id="en-us_topic_0057845585__en-us_topic_0031136109_row10578662"><th align="left" class="cellrowborder" valign="top" width="26.43%" id="mcps1.3.5.2.1.3.1.1"><p id="en-us_topic_0057845585__en-us_topic_0031136109_p51565323">Status Code</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="73.57000000000001%" id="mcps1.3.5.2.1.3.1.2"><p id="en-us_topic_0057845585__en-us_topic_0031136109_p16041657">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="en-us_topic_0057845585__en-us_topic_0031136109_row43909159"><td class="cellrowborder" valign="top" width="26.43%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0057845585__ac58be25dfe6c4aaf9db2b9a3d7fbabca">200</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="73.57000000000001%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0057845585__a6e2de6a7a37947b5aef6f82b48011a03">The request is successful.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="en-us_topic_0057845585__r7fc6a01de7944676924285967a1e5bc8"><td class="cellrowborder" valign="top" width="26.43%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0057845585__ae582169a40d14518b8b1c9e774696af6">400</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="73.57000000000001%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0057845585__a01d650708f044356a0e8711abade8518">The server failed to process the request.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="en-us_topic_0057845585__en-us_topic_0031136109_row41000636"><td class="cellrowborder" valign="top" width="26.43%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0057845585__aa1436dc96eeb4ecba5f1a6cf55c4e96d">401</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="73.57000000000001%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0057845585__a3c42a75c98a04c7b9efffdbcd6a0442b">Authentication failed.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="en-us_topic_0057845585__rbe3685e5aeff47eb990a671b5857c0c7"><td class="cellrowborder" valign="top" width="26.43%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0057845585__a3147c9b90baa43c8ad749a408a6d9b20">403</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="73.57000000000001%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0057845585__ae8403ffe26014f779b51914498b2335b">Access denied.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="en-us_topic_0057845585__re1fee93942c94c99adf7dd268d6bc21c"><td class="cellrowborder" valign="top" width="26.43%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0057845585__a9b3726f2a0fd4e9c99679f1f64a01170">404</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="73.57000000000001%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0057845585__a6fff1dadf47d4a6fb59c6e4274ffd613">The requested resource cannot be found.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="en-us_topic_0057845585__rd595ecff1f1047e9bd258da07fd41c0a"><td class="cellrowborder" valign="top" width="26.43%" headers="mcps1.3.5.2.1.3.1.1 "><p id="en-us_topic_0057845585__a1ab42a838d1c473f967bbd05e9634618">503</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="73.57000000000001%" headers="mcps1.3.5.2.1.3.1.2 "><p id="en-us_topic_0057845585__aedeaace596704f93813419fae71746d7">Service unavailable.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="en-us_topic_0057845626.html">Token Management</a></div>
|
|
</div>
|
|
</div>
|
|
|