Current Path : /usr/lib/python2.7/dist-packages/lazr/restfulclient/authorize/ |
Current File : //usr/lib/python2.7/dist-packages/lazr/restfulclient/authorize/oauth.pyc |
ó BÔLc @ s" d Z d d l m Z d d l Z d d l Z d d l Z d d l Z e d i ƒ j Z e j e j e j e j f \ Z Z Z Z d d l m Z d d l m Z e Z d d d d g Z d Z d e j f d „ ƒ YZ d e j f d „ ƒ YZ d e f d „ ƒ YZ d e f d „ ƒ YZ d S( s. OAuth classes for use with lazr.restfulclient.iÿÿÿÿ( t SafeConfigParserNs oauth.oauth( t HttpAuthorizer( t CredentialsFileErrort AccessTokent Consumert OAuthAuthorizert SystemWideConsumert 1c B s e Z d Z d d d „ Z RS( s An OAuth consumer (application).t c C s t j | | | ƒ | | _ d S( sn Initialize :param key: The OAuth consumer key :param secret: The OAuth consumer secret. Don't use this. It's a misfeature, and lazr.restful doesn't expect it. :param application_name: An application name, if different from the consumer key. If present, this will be used in the User-Agent header. N( t OAuthConsumert __init__t application_name( t selft keyt secretR ( ( sF /usr/lib/python2.7/dist-packages/lazr/restfulclient/authorize/oauth.pyR 9 s N( t __name__t __module__t __doc__t NoneR ( ( ( sF /usr/lib/python2.7/dist-packages/lazr/restfulclient/authorize/oauth.pyR 6 s c B s e Z d Z d d d „ Z RS( s An OAuth access token.R c C s t j | | | ƒ | | _ d S( N( t OAuthTokenR t context( R R R R ( ( sF /usr/lib/python2.7/dist-packages/lazr/restfulclient/authorize/oauth.pyR J s N( R R R R R ( ( ( sF /usr/lib/python2.7/dist-packages/lazr/restfulclient/authorize/oauth.pyR G s c B s/ e Z d Z d Z d d „ Z e d „ ƒ Z RS( sÿ A consumer associated with the logged-in user rather than an app. This can be used to share a single OAuth token among multiple desktop applications. The OAuth consumer key will be derived from system information (platform and hostname). s System-wide: %s (%s)R c C s# t t | ƒ j | j | | ƒ d S( s Constructor. :param application_name: An application name. This will be used in the User-Agent header. :param secret: The OAuth consumer secret. Don't use this. It's a misfeature, and lazr.restful doesn't expect it. N( t superR R t consumer_key( R R R ( ( sF /usr/lib/python2.7/dist-packages/lazr/restfulclient/authorize/oauth.pyR X s c C sg y t j ƒ \ } } } Wn t k r4 } d } n X| d k rP t j ƒ } n | j | t j ƒ f S( s³ The system-wide OAuth consumer key for this computer. This key identifies the platform and the computer's hostname. It does not identify the active user. R ( t platformt linux_distributiont Exceptiont systemt KEY_FORMATt sockett gethostname( R t distnamet versiont release_idt e( ( sF /usr/lib/python2.7/dist-packages/lazr/restfulclient/authorize/oauth.pyR c s ( R R R R R t propertyR ( ( ( sF /usr/lib/python2.7/dist-packages/lazr/restfulclient/authorize/oauth.pyR O s c B sh e Z d Z d d d d d d „ Z e d „ ƒ Z d „ Z e d „ ƒ Z d „ Z d „ Z d „ Z RS( sB A client that signs every outgoing request with OAuth credentials.R t OAuthc C sC d | _ | d k r- t | | | ƒ | _ n | | _ | | _ d S( N( R t consumerR t access_tokent oauth_realm( R t consumer_namet consumer_secretR% R&