Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update docs on sharing #6410

Merged
merged 2 commits into from
Nov 27, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 16 additions & 3 deletions docs/commercial/sharing.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Sharing
-------
=======

.. note::

Expand All @@ -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),
Expand All @@ -40,7 +40,7 @@ Enabling
If you want access to these features, email us to support@readthedocs.com.

Effects
~~~~~~~
-------

Secret Link
***********
Expand All @@ -59,10 +59,23 @@ 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 <ACCESS_TOKEN>``.
For example:

.. prompt:: bash $

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.
stsewd marked this conversation as resolved.
Show resolved Hide resolved
For example:

.. prompt:: bash $

curl --url https://docs.example.com/en/latest/example.html --user '19okmz5k0i6yk17jp70jlnv91v:'