summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorSteve Martinelli <stevemar@ca.ibm.com>2014-07-23 11:22:36 -0400
committerSteve Martinelli <stevemar@ca.ibm.com>2014-08-04 17:01:40 -0400
commit18253648d178bcbb2c76b5a2208b7f88abad926f (patch)
treeb35029f38c5dc973ac338386c89c833587ff2933 /doc
parentc758a2fc506f6687fd6234ff6e662185a010d642 (diff)
downloadpython-keystoneclient-18253648d178bcbb2c76b5a2208b7f88abad926f.tar.gz
Add docs for how to create an OAuth auth instance
Similar to the other authentication methods that were documented, like password and token, this patch will add a brief description on how to authenticate with the oauth1 plugin. Change-Id: I1b7cceb116d337be71576139601f34ca17563a50
Diffstat (limited to 'doc')
-rw-r--r--doc/source/authentication-plugins.rst20
1 files changed, 20 insertions, 0 deletions
diff --git a/doc/source/authentication-plugins.rst b/doc/source/authentication-plugins.rst
index aa8e5f5..41f04d8 100644
--- a/doc/source/authentication-plugins.rst
+++ b/doc/source/authentication-plugins.rst
@@ -99,6 +99,26 @@ endpoint you want to communicate with.
It can be found at :py:class:`keystoneclient.auth.token_endpoint.Token`.
+V3 OAuth 1.0a Plugins
+---------------------
+
+There also exists a plugin for OAuth 1.0a authentication. We provide a helper
+authentication plugin at:
+:py:class:`~keystoneclient.v3.contrib.oauth1.auth.OAuth`.
+The plugin requires the OAuth consumer's key and secret, as well as the OAuth
+access token's key and secret. For example::
+
+ >>> from keystoneclient.v3.contrib.oauth1 import auth
+ >>> from keystoneclient import session
+ >>> from keystoneclient.v3 import client
+ >>> a = auth.OAuth('http://my.keystone.com:5000/v3',
+ ... consumer_key=consumer_id,
+ ... consumer_secret=consumer_secret,
+ ... access_key=access_token_key,
+ ... access_secret=access_token_secret)
+ >>> s = session.Session(auth=a)
+
+
Creating Authentication Plugins
===============================