Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
iric-data
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bioinfo_iric
iric-data
Commits
d9cccc7b
Commit
d9cccc7b
authored
4 years ago
by
Jonathan Seguin
Browse files
Options
Downloads
Patches
Plain Diff
Add trans blocks to api page
parent
874ea720
No related branches found
No related tags found
1 merge request
!68
Resolve "Implement pubkey à la gitlab/github (ou simple token), pour permettre un accès sans fournir son mot de passe"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
portal/templates/portal/secure/user/api.html
+4
-4
4 additions, 4 deletions
portal/templates/portal/secure/user/api.html
with
4 additions
and
4 deletions
portal/templates/portal/secure/user/api.html
+
4
−
4
View file @
d9cccc7b
...
@@ -6,19 +6,19 @@
...
@@ -6,19 +6,19 @@
<div
class=
"col"
>
<div
class=
"col"
>
<div
class=
"alert alert-warning alert-dismissible fade show"
role=
"alert"
>
<div
class=
"alert alert-warning alert-dismissible fade show"
role=
"alert"
>
<h4
class=
"alert-heading"
>
{% trans 'Warning' %}!
</h4>
<h4
class=
"alert-heading"
>
{% trans 'Warning' %}!
</h4>
<p>
This token enables authentication to IRIC Data. Do not share this token!
</p>
<p>
{% trans '
This token enables authentication to IRIC Data. Do not share this token!
' %}
</p>
</div>
</div>
<p>
API Token :
</p>
<p>
{% trans '
API Token
' %}
:
</p>
<div
class=
"col-8 alert alert-dark"
>
<div
class=
"col-8 alert alert-dark"
>
<pre
class=
'mb-0'
><code><h5
class=
'mb-0'
>
{{user.profile.api_token}}
</h5></code></pre>
<pre
class=
'mb-0'
><code><h5
class=
'mb-0'
>
{{user.profile.api_token}}
</h5></code></pre>
</div>
</div>
<p>
<p>
Use this token to authenticate your API calls by inserting it in the request header with the key
't
oken
'.
{% trans '
Use this token to authenticate your API calls by inserting it in the
"Authorization"
request header with the key
"T
oken
".' %}
Ex.
Ex.
</p>
</p>
<div
class=
"col-
9
alert alert-secondary"
>
<div
class=
"col-
10
alert alert-secondary"
>
<pre
class=
'mb-0'
><code>
import requests
<pre
class=
'mb-0'
><code>
import requests
url = 'http://localhost:8000/api/v1/my-datasets/list/json/'
url = 'http://localhost:8000/api/v1/my-datasets/list/json/'
headers = {'Authorization': 'Token {{user.profile.api_token}}'}
headers = {'Authorization': 'Token {{user.profile.api_token}}'}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment