Your IP : 172.28.240.42


Current Path : /usr/lib/python2.7/dist-packages/lazr/restfulclient/authorize/
Upload File :
Current File : //usr/lib/python2.7/dist-packages/lazr/restfulclient/authorize/__init__.pyc

ó
BÔLc@sEdZeZddgZddd„ƒYZdefd„ƒYZdS(s	Classes to authorize lazr.restfulclient with various web services.

This module includes an authorizer classes for HTTP Basic Auth,
as well as a base-class authorizer that does nothing.

A set of classes for authorizing with OAuth is located in the 'oauth'
module.
tBasicHttpAuthorizertHttpAuthorizercBs/eZdZd„Zd„Zed„ƒZRS(sÇHandles authentication for HTTP requests.

    There are two ways to authenticate.

    The authorize_session() method is called once when the client is
    initialized. This works for authentication methods like Basic
    Auth.  The authorize_request is called for every HTTP request,
    which is useful for authentication methods like Digest and OAuth.

    The base class is a null authorizer which does not perform any
    authentication at all.
    cCsdS(s*Set up credentials for the entire session.N((tselftclient((sI/usr/lib/python2.7/dist-packages/lazr/restfulclient/authorize/__init__.pytauthorizeSession/scCsdS(stSet up credentials for a single request.

        This probably involves setting the Authentication header.
        N((Rtabsolute_uritmethodtbodytheaders((sI/usr/lib/python2.7/dist-packages/lazr/restfulclient/authorize/__init__.pytauthorizeRequest3scCsiS(sGAny parameters necessary to identify this user agent.

        By default this is an empty dict (because authentication
        details don't contain any information about the application
        making the request), but when a resource is protected by
        OAuth, the OAuth consumer name is part of the user agent.
        ((R((sI/usr/lib/python2.7/dist-packages/lazr/restfulclient/authorize/__init__.pytuser_agent_params:s	(t__name__t
__module__t__doc__RR	tpropertyR
(((sI/usr/lib/python2.7/dist-packages/lazr/restfulclient/authorize/__init__.pyR"s		cBs eZdZd„Zd„ZRS(s=Handles authentication for services that use HTTP Basic Auth.cCs||_||_dS(s¬Constructor.

        :param username: User to send as authorization for all requests.
        :param password: Password to send as authorization for all requests.
        N(tusernametpassword(RRR((sI/usr/lib/python2.7/dist-packages/lazr/restfulclient/authorize/__init__.pyt__init__Is	cCs|j|j|jƒdS(N(tadd_credentialsRR(RR((sI/usr/lib/python2.7/dist-packages/lazr/restfulclient/authorize/__init__.pyRRs(RRR
RR(((sI/usr/lib/python2.7/dist-packages/lazr/restfulclient/authorize/__init__.pyRFs		N((R
ttypet
__metaclass__t__all__RR(((sI/usr/lib/python2.7/dist-packages/lazr/restfulclient/authorize/__init__.pyt<module>s
	$