diff options
Diffstat (limited to 'docs/requests/authentication.rst')
-rw-r--r-- | docs/requests/authentication.rst | 13 |
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) + |