/usr/lib/python2.6/site-packages/oauth
Edit: /usr/lib/python2.6/site-packages/oauth/oauth.pyo (26113B)
OvJc
@ s d Z d d k Z d d k Z d d k Z d d k Z d d k Z d d k Z d d k Z d Z d Z d Z
d e f d YZ d d Z
d
Z d Z d Z d
d Z d
d Z d e f d YZ d e f d YZ d e f d YZ d e f d YZ d e f d YZ d e f d YZ d e f d YZ d e f d YZ d e f d! YZ d S(" s1
The MIT License
Copyright (c) 2007 Leah Culver
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
iNs 1.0t GETt PLAINTEXTt
OAuthErrorc B s e Z d Z d d Z RS( s Generic exception class.s OAuth error occured.c C s
| | _ d S( N( t message( t selfR ( ( s/ /usr/lib/python2.6/site-packages/oauth/oauth.pyt __init__) s ( t __name__t
__module__t __doc__R ( ( ( s/ /usr/lib/python2.6/site-packages/oauth/oauth.pyR ' s t c C s h d | d 6S( s, Optional WWW-Authenticate header (401 error)s OAuth realm="%s"s WWW-Authenticate( ( t realm( ( s/ /usr/lib/python2.6/site-packages/oauth/oauth.pyt build_authenticate_header, s c C s t i | d d S( s Escape a URL including any /.t safet ~( t urllibt quote( t s( ( s/ /usr/lib/python2.6/site-packages/oauth/oauth.pyt escape0 s c C s, t | t o | i d St | Sd S( s Convert unicode to utf-8.s utf-8N( t
isinstancet unicodet encodet str( R ( ( s/ /usr/lib/python2.6/site-packages/oauth/oauth.pyt _utf8_str4 s c C s t t i S( s Get seconds since epoch (UTC).( t intt time( ( ( s/ /usr/lib/python2.6/site-packages/oauth/oauth.pyt generate_timestamp; s i c C s@ d i g } t | D] } | t t i d d q ~ S( s Generate pseudorandom number.R i i ( t joint rangeR t randomt randint( t lengtht _[1]t i( ( s/ /usr/lib/python2.6/site-packages/oauth/oauth.pyt generate_nonce? s c C s@ d i g } t | D] } | t t i d d q ~ S( s Generate pseudorandom number.R i i ( R R R R R ( R R R ( ( s/ /usr/lib/python2.6/site-packages/oauth/oauth.pyt generate_verifierC s t
OAuthConsumerc B s# e Z d Z d Z d Z d Z RS( s Consumer of OAuth authentication.
OAuthConsumer is a data type that represents the identity of the Consumer
via its shared secret with the Service Provider.
c C s | | _ | | _ d S( N( t keyt secret( R R$ R% ( ( s/ /usr/lib/python2.6/site-packages/oauth/oauth.pyR R s N( R R R t NoneR$ R% R ( ( ( s/ /usr/lib/python2.6/site-packages/oauth/oauth.pyR# H s t
OAuthTokenc B sz e Z d Z d Z d Z d Z d Z d Z d Z d Z
d d Z d Z d Z
d Z e e Z d Z RS( s OAuthToken is a data type that represents an End User via either an access
or request token.
key -- the token
secret -- the token secret
c C s | | _ | | _ d S( N( R$ R% ( R R$ R% ( ( s/ /usr/lib/python2.6/site-packages/oauth/oauth.pyR e s c C s | | _ d | _ d S( Nt true( t callbackt callback_confirmed( R R) ( ( s/ /usr/lib/python2.6/site-packages/oauth/oauth.pyt set_callbacki s c C s* | d j o
| | _ n
t | _ d S( N( R&