aboutsummaryrefslogtreecommitdiffstats
path: root/config.py.sample
diff options
context:
space:
mode:
authorAsbjørn Sloth Tønnesen <ast@fiberby.net>2021-05-25 18:25:58 +0000
committerAsbjørn Sloth Tønnesen <ast@fiberby.net>2021-05-25 18:38:35 +0000
commit1f5cebcc57313ecc446929af90a6383f91edbf4f (patch)
treea45665266464ccacc55c1d9fef9fcc0e08cdc6e0 /config.py.sample
parent966b99a1a0eb13d2aa88d656116fc3d9e9acd874 (diff)
downloadpeeringdb-simplesync-1f5cebcc57313ecc446929af90a6383f91edbf4f.tar.gz
peeringdb-simplesync-1f5cebcc57313ecc446929af90a6383f91edbf4f.tar.xz
peeringdb-simplesync-1f5cebcc57313ecc446929af90a6383f91edbf4f.zip
add support for api-keysHEADmaster
Signed-off-by: Asbjørn Sloth Tønnesen <ast@fiberby.net>
Diffstat (limited to 'config.py.sample')
-rw-r--r--config.py.sample12
1 files changed, 9 insertions, 3 deletions
diff --git a/config.py.sample b/config.py.sample
index 42bbac4..0f8deeb 100644
--- a/config.py.sample
+++ b/config.py.sample
@@ -1,4 +1,3 @@
-from requests.auth import HTTPBasicAuth
#
# Config keys
# ===========
@@ -9,13 +8,20 @@ from requests.auth import HTTPBasicAuth
# db_schema: database schema name
# If not specified, it defaults to 'peeringdb'
#
+# auth: 'API-key'
+# Authenticate using an API-key.
+#
+# https://docs.peeringdb.com/blog/api_keys/
+# https://github.com/peeringdb/peeringdb/blob/master/docs/api_keys.md
+#
# auth: HTTPBasicAuth('username', 'password')
-# Authenticate using username/password
+# Authenticate using username/password (DEPRECATED)
+# requires: from requests.auth import HTTPBasicAuth
#
def get_config():
return {
'db_conn_str': 'dbname=pdbtest',
'db_schema': 'peeringdb',
- 'auth': HTTPBasicAuth('use_a_dedicated_peeringdb_account', 'and_a_long_random_password'),
+ 'auth': 'obtain_an_api-key_from_peeringdb_com',
}