forked from docs/doc-exports
Reviewed-by: gtema <artem.goncharov@gmail.com> Co-authored-by: Wang , Deng Ke <wangdengke2@huawei.com> Co-committed-by: Wang , Deng Ke <wangdengke2@huawei.com>
21 lines
2.2 KiB
HTML
21 lines
2.2 KiB
HTML
<a name="drs_01_0005"></a><a name="drs_01_0005"></a>
|
|
|
|
<h1 class="topictitle1">Authentication</h1>
|
|
<div id="body0000001073550023"><p id="drs_01_0005__en-us_topic_0117388901_p25348615486">You can use the following authentication method:</p>
|
|
<p id="drs_01_0005__en-us_topic_0117388901_p9186192384819">Token authentication: Requests are authenticated using tokens.</p>
|
|
<div class="section" id="drs_01_0005__en-us_topic_0117388901_section2474131294916"><h4 class="sectiontitle">Token Authentication</h4><div class="note" id="drs_01_0005__en-us_topic_0117388901_note14844183794912"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="drs_01_0005__en-us_topic_0117388901_p7700627164911">The validity period of a token is 24 hours. When using a token for authentication, cache it to prevent frequently calling the IAM API used to obtain a user token.</p>
|
|
</div></div>
|
|
<p id="drs_01_0005__en-us_topic_0117388901_p14700132711496">A token specifies temporary permissions in a computer system. During API authentication using a token, the token is added to requests to get permissions for calling the API.</p>
|
|
<p id="drs_01_0005__en-us_topic_0117388901_p1700152764914">In section <a href="drs_01_0008.html">3.1 Making an API Request</a>, the process of calling the API used to obtain a user token is described. After a token is obtained, add the <strong id="drs_01_0005__en-us_topic_0117388901_b2081112102311">X-Auth-Token</strong> header field must be added to requests to specify the token when calling other APIs. For example, if the token is <strong id="drs_01_0005__en-us_topic_0117388901_b147531312235">ABCDEFJ....</strong>, <strong id="drs_01_0005__en-us_topic_0117388901_b975412123320">X-Auth-Token: ABCDEFJ....</strong> can be added to a request as follows:</p>
|
|
<pre class="screen" id="drs_01_0005__en-us_topic_0117388901_screen19700727194918">GET https://iam.eu-de.otc.t-systems.com/v3/auth/projects
|
|
Content-Type: application/json
|
|
<strong id="drs_01_0005__en-us_topic_0117388901_b8700927154915">X-Auth-Token: ABCDEFJ....</strong></pre>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="drs_01_0004.html">Calling APIs</a></div>
|
|
</div>
|
|
</div>
|
|
|