Changeset View
Changeset View
Standalone View
Standalone View
swh/web/templates/auth/profile.html
Show First 20 Lines • Show All 71 Lines • ▼ Show 20 Lines | <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> | |||||
Please not that a bearer token will automatically expire after 30 days of inactivity. | |||||
</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 | ||||
</button> | </button> | ||||
<button class="btn btn-default float-right" onclick="swh.auth.applyTokenAction('revokeAll')"> | <button class="btn btn-default float-right" onclick="swh.auth.applyTokenAction('revokeAll')"> | ||||
Revoke all tokens | Revoke all tokens | ||||
</button> | </button> | ||||
Show All 18 Lines |