summaryrefslogtreecommitdiff
path: root/doc/source
diff options
context:
space:
mode:
authorPaulo Ewerton <pauloewerton@lsd.ufcg.edu.br>2016-03-29 19:10:42 +0000
committerTim Burke <tim.burke@gmail.com>2016-05-19 17:27:31 -0700
commit73e4296a389893c750f7c70a477ec828e4360197 (patch)
treebce36a7e3ec4fac46d0661c3321e153f23073be8 /doc/source
parentf9d0657e70e9511a2d7b4c63bbf06b138dd0be5e (diff)
downloadpython-swiftclient-73e4296a389893c750f7c70a477ec828e4360197.tar.gz
Adding keystoneauth sessions support
This patch allows authentication in swiftclient with a keystonauth session. Co-Authored-By: Tim Burke <tim@swiftstack.com> Change-Id: Ia3fd947ff619c11ff0ce474897533dcf7b49d9b3 Closes-Bug: 1518938
Diffstat (limited to 'doc/source')
-rw-r--r--doc/source/client-api.rst22
1 files changed, 22 insertions, 0 deletions
diff --git a/doc/source/client-api.rst b/doc/source/client-api.rst
index 5677f70..13b3056 100644
--- a/doc/source/client-api.rst
+++ b/doc/source/client-api.rst
@@ -18,6 +18,28 @@ version are detailed below, but are
just a subset of those that can be used to successfully authenticate. These
are the most common and recommended combinations.
+Keystone Session
+~~~~~~~~~~~~~~~~
+
+.. code-block:: python
+
+ from keystoneauth1 import session
+ from keystoneauth1 import v3
+
+ # Create a password auth plugin
+ auth = v3.Password(auth_url='http://127.0.0.1:5000/v3/',
+ username='tester',
+ password='testing',
+ user_domain_name='Default',
+ project_name='Default',
+ project_domain_name='Default')
+
+ # Create session
+ session = session.Session(auth=auth)
+
+ # Create swiftclient Connection
+ swift_conn = Connection(session=session)
+
Keystone v3
~~~~~~~~~~~