From 4ba66508ff25e56798731b67e96c565acefe12c0 Mon Sep 17 00:00:00 2001 From: Santos Gallegos Date: Tue, 26 Nov 2019 18:08:12 -0500 Subject: [PATCH 1/2] Update docs on sharing Mention that the token can be used in basic authorization --- docs/commercial/sharing.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/commercial/sharing.rst b/docs/commercial/sharing.rst index b14627d6a92..76d07b49e41 100644 --- a/docs/commercial/sharing.rst +++ b/docs/commercial/sharing.rst @@ -66,3 +66,11 @@ For example: .. prompt:: bash $ curl -H "Authorization: Token 19okmz5k0i6yk17jp70jlnv91v" https://docs.example.com/en/latest/example.html + + +You can also use basic authorization, with the token as user and an empty password. +For example: + +.. prompt:: bash $ + + curl --url https://docs.example.com/en/latest/example.html --user '19okmz5k0i6yk17jp70jlnv91v:' From 1ce9a9a7ecd7cf7e4dea2c5f273baa7dd2c24f27 Mon Sep 17 00:00:00 2001 From: Santos Gallegos Date: Wed, 27 Nov 2019 11:51:14 -0500 Subject: [PATCH 2/2] Use subsections --- docs/commercial/sharing.rst | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/docs/commercial/sharing.rst b/docs/commercial/sharing.rst index 76d07b49e41..5cf29b8024b 100644 --- a/docs/commercial/sharing.rst +++ b/docs/commercial/sharing.rst @@ -1,5 +1,5 @@ Sharing -------- +======= .. note:: @@ -16,7 +16,7 @@ Additionally, you can use a HTTP Authorization Header. This is useful to have access from a script. Enabling -~~~~~~~~ +-------- * Go into your *Project Admin* page and to the *Sharing* menu. * Under the *Share with someone new* heading, select the way you prefer (secret link, password, or HTTP header token), @@ -40,7 +40,7 @@ Enabling If you want access to these features, email us to support@readthedocs.com. Effects -~~~~~~~ +------- Secret Link *********** @@ -59,6 +59,9 @@ view your project. HTTP Authorization Header ************************* +Token Authorization +~~~~~~~~~~~~~~~~~~~ + You need to send the ``Authorization`` header with the token on each HTTP request. The header has the form ``Authorization: Token ``. For example: @@ -67,6 +70,8 @@ For example: curl -H "Authorization: Token 19okmz5k0i6yk17jp70jlnv91v" https://docs.example.com/en/latest/example.html +Basic Authorization +~~~~~~~~~~~~~~~~~~~ You can also use basic authorization, with the token as user and an empty password. For example: