Skip to content

Commit

Permalink
Disable proper (but now unsupported) auth, go ENV variable
Browse files Browse the repository at this point in the history
This is sad, but this change makes things workable again. Users must now
provide a suitable token via the environment variable `DATALAD_ebrains_token`.

At the moment, this software does not provide any means to obtain such a
token. Users would need to, for example, log into https://query.kg.ebrains.eu
and copy the presented token from the context menu.

Closes datalad#26
  • Loading branch information
mih committed Aug 29, 2022
1 parent 8ceb2b1 commit 7e343d2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions datalad_ebrains/kg_query.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import json
import logging
import os
from pathlib import Path
import requests
from urllib.parse import quote as urlquote
Expand Down Expand Up @@ -95,6 +96,8 @@ def query_kg4dataset(auth_token, dataset_id):


def get_token(credential, allow_interactive=True):
return os.environ['DATALAD_ebrains_token']

# we ultimately want a token, but it is only valid for a short amount of
# time, and it has to be obtained via user/pass credentials each time
user_auth = UserPassword(
Expand Down

0 comments on commit 7e343d2

Please sign in to comment.