Changeset View
Changeset View
Standalone View
Standalone View
swh/web/auth/templates/profile.html
Show First 20 Lines • Show All 69 Lines • ▼ Show 20 Lines | <div class="tab-content"> | ||||
<div id="swh-oidc-profile-tokens" class="tab-pane"> | <div id="swh-oidc-profile-tokens" class="tab-pane"> | ||||
<p class="mt-3"> | <p class="mt-3"> | ||||
That interface enables to manage bearer tokens for Web API authentication. | That interface enables to manage bearer tokens for Web API authentication. | ||||
A token has to be sent in HTTP authorization headers to make authenticated API requests. | A token has to be sent in HTTP authorization headers to make authenticated API requests. | ||||
</p> | </p> | ||||
<p> | <p> | ||||
For instance when using <code>curl</code> proceed as follows: | For instance when using <code>curl</code> proceed as follows: | ||||
<pre>curl -H "Authorization: Bearer ${TOKEN}" {{ site_base_url }}api/...</pre> | <pre>curl -H "Authorization: Bearer ${TOKEN}" {{ site_base_url }}/api/...</pre> | ||||
</p> | </p> | ||||
<p> | <p> | ||||
Please not that a bearer token will automatically expire after 30 days of inactivity. | Please not that a bearer token will automatically expire after 30 days of inactivity. | ||||
</p> | </p> | ||||
<div class="mt-3"> | <div class="mt-3"> | ||||
<div class="float-right"> | <div class="float-right"> | ||||
<button class="btn btn-default" onclick="swh.auth.applyTokenAction('generate')"> | <button class="btn btn-default" onclick="swh.auth.applyTokenAction('generate')"> | ||||
Generate new token | Generate new token | ||||
Show All 22 Lines |