forked from datalad/datalad
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add the "http_token" authentication mechanism
It is pretty much the "Bearer TOKEN" method but which uses different keyword "Token". It is e.g. the one provided by Django REST Framework. GitHub allows for both 'Bearer' and 'Token' keywords: https://docs.github.com/en/rest/authentication/authenticating-to-the-rest-api?apiVersion=2022-11-28 In our case of DANDI we ran into it only now that we decided to add handling of embargoed datasets, for which we need to authenticate to access the files. We are using Django REST Framework and insofar decision was made to retain current approach (and fix WWW-Authentication header response), instead of an alternative to allow for both 'Bearer' and 'Token' as was suggested in dandi/dandi-archive#1830 As it is ad-hoc (nothing AFAIK in W3C standard) Authentication response I do not think some automation would ever be created based on WWW-Authentication but we will be able to support such providers.
- Loading branch information
1 parent
08315c1
commit b22f9de
Showing
3 changed files
with
25 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters