From 33e7be35e3a01ad0666a0833a9ace0584579428f Mon Sep 17 00:00:00 2001
From: Henrik Levkowetz
Date: Sun, 8 Apr 2018 13:24:14 +0000
Subject: [PATCH] Added more information about personal API keys to the API
help page. - Legacy-Id: 15031
---
ietf/api/views.py | 2 +-
ietf/templates/api/index.html | 43 +++++++++++++++++++++++++++++++----
2 files changed, 39 insertions(+), 6 deletions(-)
diff --git a/ietf/api/views.py b/ietf/api/views.py
index 4ffff0a54..74d453513 100644
--- a/ietf/api/views.py
+++ b/ietf/api/views.py
@@ -48,5 +48,5 @@ def api_help(request):
key = JWK()
# import just public part here, for display in info page
key.import_from_pem(settings.API_PUBLIC_KEY_PEM)
- return render(request, "api/index.html", {'key': key, })
+ return render(request, "api/index.html", {'key': key, 'settings':settings, })
diff --git a/ietf/templates/api/index.html b/ietf/templates/api/index.html
index ed32ca5ee..ef1cbe3c1 100644
--- a/ietf/templates/api/index.html
+++ b/ietf/templates/api/index.html
@@ -164,7 +164,7 @@
etc.
- API Keys
+ Personal API Keys
@@ -172,12 +172,45 @@
rather than username/password login, see for example details for
{% url 'ietf.doc.views_ballot.api_set_position' %}
further
down on this page. Personal API keys are available from your Account API Key
+ href="{% url 'ietf.ietfauth.views.apikey_index'%}"> Account API Keys
page when you are logged in.
+
-
Signing
+ Personal API keys have some characteristics you should be aware of:
+
+ -
+
+ Each API key is valid only for a specific endpoint. If you try to use a key for
+ a different API endpoint than it's created for, it will not work.
+
+
+ -
+
+ The API keys will cause you to be given access with the datatracker
+ roles you have, thus giving you appropriate access to the various
+ API endpoints according to the role limitations indicated for each
+ endpoint.
+
+
+ -
+
+ An API key will only give you access to its related endpoint if you have logged
+ in to the datatracker using your regular login and password during the last
+ {{ settings.UTILS_APIKEY_GUI_LOGIN_LIMIT_DAYS }} days. If you receive the
+ error message "
Too long since last regular login
" you should do
+ a regular login in order to activate access.
+
+
+
+
+
+
+
+
+
+ Signing Keys
When sending notifications to other APIs, the datatracker may sign
@@ -192,7 +225,7 @@
{{key.export_to_pem}}
- IESG ballot position API
+ IESG ballot position API
@@ -228,7 +261,7 @@
-
Set session video URL
+ Set session video URL