aboutsummaryrefslogtreecommitdiff
path: root/docs/requests/authentication.rst
diff options
context:
space:
mode:
authoradamw <adam@warski.org>2017-10-17 17:28:50 +0200
committeradamw <adam@warski.org>2017-10-17 17:28:50 +0200
commit6e109a964383bfe5e2be04f65fa7cc1356a97cbe (patch)
tree7764ff94d72e0ffbf1e593fb8c5886562dc57f33 /docs/requests/authentication.rst
parent06bd5c95d04dd57e1b6c2572b94336b8fdb68bfa (diff)
downloadsttp-6e109a964383bfe5e2be04f65fa7cc1356a97cbe.tar.gz
sttp-6e109a964383bfe5e2be04f65fa7cc1356a97cbe.tar.bz2
sttp-6e109a964383bfe5e2be04f65fa7cc1356a97cbe.zip
More docs
Diffstat (limited to 'docs/requests/authentication.rst')
-rw-r--r--docs/requests/authentication.rst13
1 files changed, 13 insertions, 0 deletions
diff --git a/docs/requests/authentication.rst b/docs/requests/authentication.rst
new file mode 100644
index 0000000..f97f74a
--- /dev/null
+++ b/docs/requests/authentication.rst
@@ -0,0 +1,13 @@
+Authentication
+==============
+
+sttp supports basic and bearer-token based authentication. In both cases, an ``Authorization`` header is added with the appropriate credentials.
+
+Basic authentication, using which the username and password are encoded using Base64, can be added as follows::
+
+ sttp.auth.basic(username, password)
+
+A bearer token can be added using::
+
+ sttp.auth.bearer(token)
+