forked from docs/doc-exports
Reviewed-by: Eotvos, Oliver <oliver.eotvos@t-systems.com> Co-authored-by: Chen, Junjie <chenjunjie@huawei.com> Co-committed-by: Chen, Junjie <chenjunjie@huawei.com>
18 lines
2.3 KiB
HTML
18 lines
2.3 KiB
HTML
<a name="functiongraph_06_0230"></a><a name="functiongraph_06_0230"></a>
|
|
|
|
<h1 class="topictitle1">Authentication</h1>
|
|
<div id="body2894687"><p id="functiongraph_06_0230__p153195218119">Requests for calling an API can be authenticated using either of the following methods:</p>
|
|
<ul id="functiongraph_06_0230__ul5319524113"><li id="functiongraph_06_0230__li73052111116">Token-based authentication: Requests are authenticated using a token.</li><li id="functiongraph_06_0230__li53125231118">AK/SK-based authentication: Requests are authenticated by encrypting the request body using an AK/SK.</li></ul>
|
|
<div class="section" id="functiongraph_06_0230__section20951951151114"><h4 class="sectiontitle">Token-based Authentication</h4><div class="note" id="functiongraph_06_0230__note101031751201119"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="functiongraph_06_0230__p33155261112">The validity period of a token is 24 hours. When using a token for authentication, cache it to prevent frequently calling the Identity and Access Management (IAM) API used to obtain a user token.</p>
|
|
</div></div>
|
|
<p id="functiongraph_06_0230__p1036523114">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="functiongraph_06_0230__p1431652191111">In <a href="functiongraph_06_0210.html">Making an API Request</a>, the process of calling the API used to <a href="https://docs.otc.t-systems.com/identity-access-management/api-ref/apis/token_management/obtaining_a_user_token.html" target="_blank" rel="noopener noreferrer">obtain a user token</a> is described. After a token is obtained, the <strong id="functiongraph_06_0230__b155981818104411">X-Auth-Token</strong> header field must be added to requests to specify the token when other APIs are called. For example, if the token is <strong id="functiongraph_06_0230__b1312963334420">ABCDEFJ....</strong>, <strong id="functiongraph_06_0230__b99571935144418">X-Auth-Token: ABCDEFJ....</strong> can be added to a request as follows:</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="functiongraph_06_0200.html">Calling APIs</a></div>
|
|
</div>
|
|
</div>
|
|
|