Skip to content
Browse files

updating documentation; version 0.1.10

  • Loading branch information...
1 parent 6f73125 commit ce5d684ecaa96d4d9c03c89e256ceaaebfc89463 @maxcountryman maxcountryman committed Mar 15, 2012
View
BIN docs/_build/doctrees/environment.pickle
Binary file not shown.
View
BIN docs/_build/doctrees/index.doctree
Binary file not shown.
View
2 docs/_build/html/.buildinfo
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
-config: b9b126491ce3d87c154f3b01012d4f58
+config: 686d1d9a53cf9d513f5d3adea79e6b90
tags: fbb0d17656682115ca4d033fb2f83ba1
View
3 docs/_build/html/_sources/index.txt
@@ -111,3 +111,6 @@ API
.. autoclass:: webauth.service.OAuth1Service
:members:
+
+.. autoclass:: webauth.hook.OAuth1Hook
+ :members:
View
26 docs/_build/html/genindex.html
@@ -9,15 +9,15 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>Index &mdash; Webauth 0.1.9 documentation</title>
+ <title>Index &mdash; Webauth 0.1.10 documentation</title>
<link rel="stylesheet" href="_static/flasky.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '',
- VERSION: '0.1.9',
+ VERSION: '0.1.10',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@@ -26,7 +26,7 @@
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
- <link rel="top" title="Webauth 0.1.9 documentation" href="index.html" />
+ <link rel="top" title="Webauth 0.1.10 documentation" href="index.html" />
</head>
<body>
@@ -52,6 +52,14 @@ <h2 id="G">G</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%" valign="top"><dl>
+ <dt><a href="index.html#webauth.hook.OAuth1Hook.generate_authorization_header">generate_authorization_header() (webauth.hook.OAuth1Hook method)</a>
+ </dt>
+
+
+ <dt><a href="index.html#webauth.hook.OAuth1Hook.generate_oauth_params">generate_oauth_params() (webauth.hook.OAuth1Hook method)</a>
+ </dt>
+
+
<dt><a href="index.html#webauth.service.OAuth1Service.get_access_token">get_access_token() (webauth.service.OAuth1Service method)</a>
</dt>
@@ -61,12 +69,12 @@ <h2 id="G">G</h2>
</dt>
</dl></dd>
+ </dl></td>
+ <td style="width: 33%" valign="top"><dl>
<dt><a href="index.html#webauth.service.OAuth1Service.get_authenticated_session">get_authenticated_session() (webauth.service.OAuth1Service method)</a>
</dt>
- </dl></td>
- <td style="width: 33%" valign="top"><dl>
<dt><a href="index.html#webauth.service.OAuth1Service.get_authorize_url">get_authorize_url() (webauth.service.OAuth1Service method)</a>
</dt>
@@ -92,16 +100,20 @@ <h2 id="O">O</h2>
<table style="width: 100%" class="indextable genindextable"><tr>
<td style="width: 33%" valign="top"><dl>
- <dt><a href="index.html#webauth.service.OAuth1Service">OAuth1Service (class in webauth.service)</a>
+ <dt><a href="index.html#webauth.hook.OAuth1Hook">OAuth1Hook (class in webauth.hook)</a>
</dt>
- <dt><a href="index.html#webauth.service.OAuth2Service">OAuth2Service (class in webauth.service)</a>
+ <dt><a href="index.html#webauth.service.OAuth1Service">OAuth1Service (class in webauth.service)</a>
</dt>
</dl></td>
<td style="width: 33%" valign="top"><dl>
+ <dt><a href="index.html#webauth.service.OAuth2Service">OAuth2Service (class in webauth.service)</a>
+ </dt>
+
+
<dt><a href="index.html#webauth.service.OflyService">OflyService (class in webauth.service)</a>
</dt>
View
101 docs/_build/html/index.html
@@ -7,15 +7,15 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>Webauth &mdash; Webauth 0.1.9 documentation</title>
+ <title>Webauth &mdash; Webauth 0.1.10 documentation</title>
<link rel="stylesheet" href="_static/flasky.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '',
- VERSION: '0.1.9',
+ VERSION: '0.1.10',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@@ -24,7 +24,7 @@
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
- <link rel="top" title="Webauth 0.1.9 documentation" href="#" />
+ <link rel="top" title="Webauth 0.1.10 documentation" href="#" />
</head>
<body>
@@ -180,11 +180,9 @@
<dl class="method">
<dt id="webauth.service.OflyService.request">
-<tt class="descname">request</tt><big>(</big><em>http_method</em>, <em>url</em>, <em>header_auth=False</em>, <em>**params</em><big>)</big><a class="headerlink" href="#webauth.service.OflyService.request" title="Permalink to this definition">¶</a></dt>
+<tt class="descname">request</tt><big>(</big><em>http_method</em>, <em>url</em>, <em>header_auth=False</em>, <em>params=None</em>, <em>data=None</em><big>)</big><a class="headerlink" href="#webauth.service.OflyService.request" title="Permalink to this definition">¶</a></dt>
<dd><p>Sends a request to an Ofly endpoint, properly wrapped around
requests.</p>
-<p>The first time an access token is provided it will be saved on the
-object for convenience.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
@@ -194,8 +192,9 @@
used.</li>
<li><strong>url</strong> &#8211; The resource to be requested.</li>
<li><strong>header_auth</strong> &#8211; Authenication via header, defaults to False.</li>
-<li><strong>params</strong> &#8211; Additional keyworded arguments to be added to the
-request querystring.</li>
+<li><strong>params</strong> &#8211; Additional arguments to be added to the request
+querystring.</li>
+<li><strong>data</strong> &#8211; Additional data to be included in the request body.</li>
</ul>
</td>
</tr>
@@ -291,7 +290,7 @@
<dl class="method">
<dt id="webauth.service.OAuth2Service.request">
-<tt class="descname">request</tt><big>(</big><em>http_method</em>, <em>url</em>, <em>access_token=None</em>, <em>**params</em><big>)</big><a class="headerlink" href="#webauth.service.OAuth2Service.request" title="Permalink to this definition">¶</a></dt>
+<tt class="descname">request</tt><big>(</big><em>http_method</em>, <em>url</em>, <em>access_token=None</em>, <em>params=None</em>, <em>data=None</em><big>)</big><a class="headerlink" href="#webauth.service.OAuth2Service.request" title="Permalink to this definition">¶</a></dt>
<dd><p>Sends a request to an OAuth 2.0 endpoint, properly wrapped around
requests.</p>
<p>The first time an access token is provided it will be saved on the
@@ -306,8 +305,9 @@
<li><strong>url</strong> &#8211; The resource to be requested.</li>
<li><strong>access_token</strong> &#8211; The access token as returned by
<tt class="xref py py-class docutils literal"><span class="pre">get_access_token</span></tt>.</li>
-<li><strong>params</strong> &#8211; Additional keyworded arguments to be added to the
-request querystring.</li>
+<li><strong>params</strong> &#8211; Additional arguments to be added to the request
+querystring.</li>
+<li><strong>data</strong> &#8211; Additional data to be included in the request body.</li>
</ul>
</td>
</tr>
@@ -489,6 +489,85 @@
</dd></dl>
+<dl class="class">
+<dt id="webauth.hook.OAuth1Hook">
+<em class="property">class </em><tt class="descclassname">webauth.hook.</tt><tt class="descname">OAuth1Hook</tt><big>(</big><em>consumer_key</em>, <em>consumer_secret</em>, <em>access_token=None</em>, <em>access_token_secret=None</em>, <em>header_auth=False</em>, <em>signature=None</em><big>)</big><a class="headerlink" href="#webauth.hook.OAuth1Hook" title="Permalink to this definition">¶</a></dt>
+<dd><p>Provides a pre-request hook into requests for OAuth 1.0/a services.</p>
+<p>This package is built on the excellent Python Requests package. It
+functions by &#8220;hooking&#8221; into a request and appending various attributes to
+it which allow a client to interact with a standardized OAuth 1.0/a
+provider.</p>
+<p>You might intialize <tt class="xref py py-class docutils literal"><span class="pre">OAuthHook</span></tt> something like this:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="n">oauth</span> <span class="o">=</span> <span class="n">OAuthHook</span><span class="p">(</span><span class="n">consumer_key</span><span class="o">=</span><span class="mi">1234</span><span class="p">,</span>
+ <span class="n">consumer_secret</span><span class="o">=</span><span class="mi">5678</span><span class="p">)</span>
+<span class="n">oauth_session</span> <span class="o">=</span> <span class="n">requests</span><span class="o">.</span><span class="n">session</span><span class="p">(</span><span class="n">hooks</span><span class="o">=</span><span class="p">{</span><span class="s">&#39;pre_request&#39;</span><span class="p">:</span> <span class="n">oauth</span><span class="p">})</span>
+</pre></div>
+</div>
+<p>This establishes a requests session that is wrapped if the OAuth-capable
+hook. Using this session, an OAuth provider may be interacted with and
+will receive the proper formatting for requests.</p>
+<p>Note that this is normally used as a starting from which a request token
+would be generated whereupon an access token is received. Once such a token
+has been received, the wrapper should be reinitalized with this token:</p>
+<div class="highlight-python"><div class="highlight"><pre><span class="c"># we provide our consumer pair as well as the access pair as returned</span>
+<span class="c"># by the provider endpoint</span>
+<span class="n">oauth</span> <span class="o">=</span> <span class="n">OAuthHook</span><span class="p">(</span><span class="n">consumer_key</span><span class="o">=</span><span class="mi">1234</span><span class="p">,</span>
+ <span class="n">consumer_secret</span><span class="o">=</span><span class="mi">5678</span><span class="p">,</span>
+ <span class="n">access_token</span><span class="o">=</span><span class="mi">4321</span><span class="p">,</span>
+ <span class="n">access_token_secret</span><span class="o">=</span><span class="mi">8765</span><span class="p">)</span>
+<span class="n">oauth_session</span> <span class="o">=</span> <span class="n">requests</span><span class="o">.</span><span class="n">session</span><span class="p">(</span><span class="n">hooks</span><span class="o">=</span><span class="p">{</span><span class="s">&#39;pre_request&#39;</span><span class="p">:</span> <span class="n">oauth</span><span class="p">})</span>
+</pre></div>
+</div>
+<p>The session is now ready to make calls to the endpoints made available by
+the provider.</p>
+<p>Additionally some services will make use of header authentication. This is
+provided by passing <tt class="xref py py-class docutils literal"><span class="pre">__init__</span></tt> the <cite>auth_header</cite> parameter as
+<cite>True</cite>.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>consumer_key</strong> &#8211; Client consumer key.</li>
+<li><strong>consumer_secret</strong> &#8211; Client consumer secret.</li>
+<li><strong>access_token</strong> &#8211; Access token key.</li>
+<li><strong>access_token_secret</strong> &#8211; Access token secret.</li>
+<li><strong>header_auth</strong> &#8211; Authenication via header, defauls to False.</li>
+<li><strong>signature</strong> &#8211; A signature method used to sign request parameters.</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+<p>Defaults to None. If None the <cite>HmacSha1Signature</cite> method is used as
+default.</p>
+<dl class="method">
+<dt id="webauth.hook.OAuth1Hook.generate_authorization_header">
+<tt class="descname">generate_authorization_header</tt><big>(</big><em>oauth_params</em>, <em>realm=None</em><big>)</big><a class="headerlink" href="#webauth.hook.OAuth1Hook.generate_authorization_header" title="Permalink to this definition">¶</a></dt>
+<dd><p>This method constructs an authorization header.</p>
+<table class="docutils field-list" frame="void" rules="none">
+<col class="field-name" />
+<col class="field-body" />
+<tbody valign="top">
+<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
+<li><strong>oauth_params</strong> &#8211; The OAuth parameters to be added to the header.</li>
+<li><strong>realm</strong> &#8211; The authentication realm. Defaults to None.</li>
+</ul>
+</td>
+</tr>
+</tbody>
+</table>
+</dd></dl>
+
+<dl class="method">
+<dt id="webauth.hook.OAuth1Hook.generate_oauth_params">
+<tt class="descname">generate_oauth_params</tt><big>(</big><big>)</big><a class="headerlink" href="#webauth.hook.OAuth1Hook.generate_oauth_params" title="Permalink to this definition">¶</a></dt>
+<dd><p>This method handles generating the necessary URL parameters the
+OAuth provider will expect.</p>
+</dd></dl>
+
+</dd></dl>
+
</div>
</div>
View
BIN docs/_build/html/objects.inv
Binary file not shown.
View
6 docs/_build/html/py-modindex.html
@@ -7,15 +7,15 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>Python Module Index &mdash; Webauth 0.1.9 documentation</title>
+ <title>Python Module Index &mdash; Webauth 0.1.10 documentation</title>
<link rel="stylesheet" href="_static/flasky.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '',
- VERSION: '0.1.9',
+ VERSION: '0.1.10',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@@ -24,7 +24,7 @@
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
- <link rel="top" title="Webauth 0.1.9 documentation" href="index.html" />
+ <link rel="top" title="Webauth 0.1.10 documentation" href="index.html" />
<script type="text/javascript">
View
6 docs/_build/html/search.html
@@ -7,15 +7,15 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <title>Search &mdash; Webauth 0.1.9 documentation</title>
+ <title>Search &mdash; Webauth 0.1.10 documentation</title>
<link rel="stylesheet" href="_static/flasky.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '',
- VERSION: '0.1.9',
+ VERSION: '0.1.10',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
@@ -25,7 +25,7 @@
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/searchtools.js"></script>
- <link rel="top" title="Webauth 0.1.9 documentation" href="index.html" />
+ <link rel="top" title="Webauth 0.1.10 documentation" href="index.html" />
<script type="text/javascript">
jQuery(function() { Search.loadIndex("searchindex.js"); });
</script>
View
2 docs/_build/html/searchindex.js
@@ -1 +1 @@
-Search.setIndex({objects:{"":{webauth:[0,0,1,""]},"webauth.service":{OflyService:[0,1,1,""],OAuth2Service:[0,1,1,""],OAuth1Service:[0,1,1,""]},"webauth.service.OAuth2Service":{get_access_token:[0,2,1,""],request:[0,2,1,""],get_authorize_url:[0,2,1,""]},"webauth.service.OflyService":{request:[0,2,1,""],get_authorize_url:[0,2,1,""]},"webauth.service.OAuth1Service":{get_authenticated_session:[0,2,1,""],get_request_token:[0,2,1,""],get_access_token:[0,2,1,""],request:[0,2,1,""],get_authorize_url:[0,2,1,""]}},terms:{represent:0,all:[],code:0,authorization_cod:0,when:[],random:[],obtain:0,session:0,through:0,follow:0,token_kei:0,paramet:0,redirect:0,whose:[],onli:0,acquir:0,redirect_uri:0,flask:[],activ:[],param:0,should:0,response_typ:0,onc:0,input:[],hidden:[],main:[],might:0,modul:0,applic:0,global:[],"return":0,around:0,thei:[],get:0,python:0,than:0,none:0,initi:[],defaul:[],util:0,webauth:0,csrf:[],request_token:0,now:0,presum:0,string:0,like:0,name:0,specif:0,hook:0,possibl:0,"_construct_sess":0,authent:0,provid:0,token:0,exampl:0,necessari:0,contain:0,cooki:[],querystr:0,servic:0,view:[],oflyservic:0,www:0,set:0,primari:[],natur:0,secret:0,resourc:0,prehook:0,sign:0,consum:0,ensur:0,see:0,http_method:0,design:[],pass:0,fail:[],hash:[],variabl:0,subsequ:0,oflycallsignatur:0,flaskext:[],influenc:[],assum:0,someth:0,achiev:[],superb:0,content:0,enough:0,header_auth:0,django:[],"import":0,get_authorization_url:0,method:0,altern:0,intial:0,after:0,run:[],kei:0,gener:0,usag:0,accordingli:0,here:0,consumer_secret:0,extens:0,step:0,base:[],dictionari:0,setup:0,ask:0,post:[],valid:0,valu:[],addit:0,csrftoken:[],both:[],seasurf:[],similar:0,could:0,current:0,http:0,oauth2servic:0,get_access_token:0,turn:0,instanc:[],oauth_token:0,logic:[],fals:0,implement:0,com:0,assign:[],commonli:0,first:0,request_token_secret:0,pleas:0,rang:[],via:0,simpli:0,although:0,directli:0,point:0,foobar:0,app:[],easy_instal:0,oauth_request:0,header:0,api:0,oauth_kei:0,send:0,wrap:0,instal:0,miss:[],your:[],middlewar:[],backend:[],quit:0,given:0,doe:0,from:0,wai:0,start:0,addition:0,top:0,support:0,visit:0,two:0,been:0,avail:0,attach:0,reli:0,call:0,includ:0,save:0,render_templ:[],type:0,"final":0,more:0,"function":[],field:[],head:[],wrapper:0,option:0,form:[],conveni:0,exempt:[],rsa:0,oauth1servic:0,oflycallbackurl:0,made:0,bodi:0,templat:[],oauth:0,request_token_url:0,get_authenticated_sess:0,easiest:0,access_token_url:0,remote_us:0,jinja:[],endpoint:0,retriev:0,look:[],keyword:0,some_view:[],"default":0,wish:[],secret_kei:[],access:0,spec:0,can:0,abov:0,other:[],access_token_secret:0,def:[],pre:0,have:0,process:0,request:0,csrf_token:[],respons:0,shutterfli:0,argument:0,indic:[],get_authorize_url:0,packag:0,properli:0,want:0,deliv:0,pip:0,exclud:[],check:[],deault:0,access_token:0,decor:[],built:0,authen:0,author:0,rather:0,oauthhook:0,authorize_url:0,uri:0,reponse_typ:0,init_app:[],consumer_kei:0,note:0,also:0,need:0,html:[],"_csrf_token":[],futur:0,which:0,relav:0,before_request:[],instead:0,you:0,document:0,simpl:0,updat:0,oflyremoteus:0,simplifi:0,begin:0,sure:0,unless:[],thi:0,trace:[],proper:0,object:0,upon:0,sfly:0,rout:[],most:0,render:[],specifi:[],streamlin:0,mai:0,data:0,"class":0,get_request_token:0,simplic:0,sha1:0,off:[],url:0,bind:0,grant:0,well:0,ofli:0,produc:0,inform:0,client:0,command:0,allow:0,time:0,grant_typ:0,salt:[],make:0,usual:0},objtypes:{"0":"py:module","1":"py:class","2":"py:method"},titles:["Webauth"],objnames:{"0":["py","module","Python module"],"1":["py","class","Python class"],"2":["py","method","Python method"]},filenames:["index"]})
+Search.setIndex({objects:{"":{webauth:[0,0,1,""]},"webauth.service.OflyService":{request:[0,2,1,""],get_authorize_url:[0,2,1,""]},"webauth.service.OAuth2Service":{get_access_token:[0,2,1,""],request:[0,2,1,""],get_authorize_url:[0,2,1,""]},"webauth.service.OAuth1Service":{get_authenticated_session:[0,2,1,""],get_request_token:[0,2,1,""],get_access_token:[0,2,1,""],request:[0,2,1,""],get_authorize_url:[0,2,1,""]},"webauth.service":{OflyService:[0,1,1,""],OAuth2Service:[0,1,1,""],OAuth1Service:[0,1,1,""]},"webauth.hook":{OAuth1Hook:[0,1,1,""]},"webauth.hook.OAuth1Hook":{generate_authorization_header:[0,2,1,""],generate_oauth_params:[0,2,1,""]}},terms:{represent:0,all:[],code:0,authorization_cod:0,excel:0,auth_head:0,random:[],obtain:0,addit:0,top:0,session:0,through:0,follow:0,token_kei:0,paramet:0,redirect:0,whose:[],onli:0,acquir:0,redirect_uri:0,flask:[],endpoint:0,activ:[],param:0,should:0,reinit:0,response_typ:0,foobar:0,input:[],hidden:[],main:[],might:0,app:[],applic:0,global:[],"return":0,oauth1hook:0,thei:[],get:0,python:0,initi:[],defaul:0,util:0,webauth:0,oauth_request:0,csrf:[],request_token:0,now:0,you:0,string:0,like:0,document:0,name:0,specif:0,hook:0,reponse_typ:0,"_construct_sess":0,html:[],authent:0,"default":0,achiev:[],necessari:0,contain:0,cooki:[],querystr:0,servic:0,deault:0,view:[],oflyservic:0,www:0,set:0,intial:0,client:0,natur:0,some:0,prehook:0,sign:0,consum:0,wrap:0,see:0,http_method:0,design:[],expect:0,authorize_url:0,pass:0,fail:[],run:[],append:0,variabl:0,setup:0,oflycallsignatur:0,flaskext:[],influenc:[],miss:[],someth:0,token:0,superb:0,content:0,enough:0,header_auth:0,"import":0,method:0,attribut:0,altern:0,signatur:0,object:0,hash:[],kei:0,gener:0,usag:0,given:0,here:0,standard:0,consumer_secret:0,extens:0,step:0,base:[],whereupon:0,dictionari:0,ask:0,post:[],secret_kei:[],valu:[],jinja:[],csrftoken:[],both:[],seasurf:[],produc:0,your:[],wai:0,most:0,access_token_secret:0,could:0,current:0,http:0,oauth2servic:0,get_access_token:0,turn:0,instanc:[],oauth_token:0,logic:[],implement:0,reli:0,com:0,assign:[],commonli:0,first:0,request_token_secret:0,pleas:0,rang:[],via:0,simpli:0,although:0,directli:0,point:0,onc:0,modul:0,easy_instal:0,pre_request:0,header:0,api:0,oauth_kei:0,send:0,exclud:[],ensur:0,instal:0,hmacsha1signatur:0,assum:0,primari:[],middlewar:[],backend:[],quit:0,accordingli:0,from:0,would:0,attach:0,addition:0,data:0,interact:0,support:0,visit:0,two:0,been:0,avail:0,start:0,secret:0,call:0,includ:0,easiest:0,handl:0,some_view:[],render_templ:[],type:0,"final":0,more:0,"function":0,field:[],head:[],wrapper:0,option:0,form:[],conveni:0,exempt:[],rsa:0,oauth1servic:0,oflycallbackurl:0,made:0,bodi:0,indic:[],oauth:0,request_token_url:0,get_authenticated_sess:0,"true":0,than:0,access_token_url:0,remote_us:0,also:0,none:0,subsequ:0,retriev:0,look:[],keyword:0,possibl:0,provid:0,wish:[],ofli:0,access:0,spec:0,can:0,abov:0,oauth_param:0,inform:0,other:[],similar:0,def:[],pre:0,want:0,generate_oauth_param:0,process:0,well:0,csrf_token:[],respons:0,shutterfli:0,argument:0,templat:[],get_authorize_url:0,packag:0,properli:0,have:0,deliv:0,pip:0,django:[],check:[],"__init__":0,around:0,access_token:0,readi:0,oauth_sess:0,variou:0,authen:0,author:0,rather:0,oauthhook:0,make:0,format:0,when:[],init_app:[],consumer_kei:0,note:0,fals:0,need:0,valid:0,pair:0,futur:0,which:0,relav:0,before_request:[],instead:0,presum:0,generate_authorization_head:0,simpl:0,updat:0,oflyremoteus:0,simplifi:0,begin:0,sure:0,resourc:0,allow:0,trace:[],normal:0,our:0,proper:0,after:0,upon:0,decor:[],sfly:0,rout:[],"_csrf_token":[],capabl:0,render:[],specifi:[],establish:0,streamlin:0,mai:0,realm:0,construct:0,unless:[],"class":0,built:0,get_request_token:0,simplic:0,sha1:0,off:[],save:0,url:0,bind:0,grant:0,request:0,uri:0,doe:0,receiv:0,exampl:0,command:0,thi:0,time:0,grant_typ:0,salt:[],get_authorization_url:0,usual:0},objtypes:{"0":"py:module","1":"py:class","2":"py:method"},titles:["Webauth"],objnames:{"0":["py","module","Python module"],"1":["py","class","Python class"],"2":["py","method","Python method"]},filenames:["index"]})
View
3 docs/index.rst
@@ -111,3 +111,6 @@ API
.. autoclass:: webauth.service.OAuth1Service
:members:
+
+.. autoclass:: webauth.hook.OAuth1Hook
+ :members:
View
2 webauth/__init__.py
@@ -6,4 +6,4 @@
'''
-__version__ = '0.1.9'
+__version__ = '0.1.10'
View
14 webauth/service.py
@@ -116,7 +116,7 @@ def get_authorize_url(self, remote_user=None, redirect_uri=None, **params):
:param remote_user: This is the oflyRemoteUser param. Defaults to None.
:param redirect_uri: This is the oflyCallbackUrl. Defaults to None.
- :param **params: Additional keyworded arguments to be added to the
+ :param params: Additional keyworded arguments to be added to the
request querystring.
'''
if remote_user is not None:
@@ -221,7 +221,7 @@ def get_authorize_url(self, response_type='code', **params):
'''Returns a proper authorize URL.
:param reponse_type: The response type. Defaults to 'code'.
- :param **params: Additional keyworded arguments to be added to the
+ :param params: Additional keyworded arguments to be added to the
request querystring.
'''
params.update({'client_id': self.consumer_key,
@@ -233,7 +233,7 @@ def get_access_token(self, grant_type='authorization_code', **data):
'''Retrieves the access token.
:param grant_type: The grant type. Deaults to 'authorization_code'.
- :param **data: Keyworded arguments to be passed in the body of the
+ :param data: Keyworded arguments to be passed in the body of the
request.
'''
data.update({'grant_type': grant_type})
@@ -353,7 +353,7 @@ def _construct_session(self, **kwargs):
'''Construct the request session, supplying the consumer key and
secret.
- :param **kwargs: Extra keyworded arguments to be passed to the
+ :param kwargs: Extra keyworded arguments to be passed to the
OAuth1Hook constructor.
'''
hook = OAuth1Hook(consumer_key=self.consumer_key,
@@ -366,7 +366,7 @@ def get_request_token(self, http_method, **data):
:param http_method: A string representation of the HTTP method to be
used.
- :param **data: Keyworded arguments to be passed in the body of the
+ :param data: Keyworded arguments to be passed in the body of the
request.
'''
auth_session = \
@@ -386,7 +386,7 @@ def get_authorize_url(self, request_token, **params):
:param request_token: The request token as returned by
:class:`get_request_token`.
- :param **params: Additional keyworded arguments to be added to the
+ :param params: Additional keyworded arguments to be added to the
request querystring.
'''
params.update({'oauth_token': quote(request_token)})
@@ -403,7 +403,7 @@ def get_access_token(self, request_token, request_token_secret,
:class:`get_request_token`.
:param http_method: A string representation of the HTTP method to be
used.
- :param **params: Additional keyworded arguments to be added to the
+ :param params: Additional keyworded arguments to be added to the
request querystring.
'''
auth_session = self._construct_session(

0 comments on commit ce5d684

Please sign in to comment.
Something went wrong with that request. Please try again.