File manager - Edit - /home/newsbmcs.com/public_html/static/img/logo/authorize.zip
Back
PK -�Z�5�z� � $ __pycache__/__init__.cpython-310.pycnu �[��� o �3�O� � @ s: d Z eZddgZddlZG dd� d�ZG dd� de�ZdS )a 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. �BasicHttpAuthorizer�HttpAuthorizer� Nc @ s, e Zd ZdZdd� Zdd� Zedd� �ZdS ) r a� 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. c C � dS )z*Set up credentials for the entire session.N� ��self�clientr r �G/usr/lib/python3/dist-packages/lazr/restfulclient/authorize/__init__.py�authorizeSession2 s zHttpAuthorizer.authorizeSessionc C r )ztSet up credentials for a single request. This probably involves setting the Authentication header. Nr �r �absolute_uri�method�body�headersr r r �authorizeRequest6 s zHttpAuthorizer.authorizeRequestc C s i S )aG Any 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 )r r r r �user_agent_params= s z HttpAuthorizer.user_agent_paramsN)�__name__� __module__�__qualname__�__doc__r r �propertyr r r r r r % s c @ s( e Zd ZdZdd� Zdd� Zdd� ZdS ) r z=Handles authentication for services that use HTTP Basic Auth.c C s || _ || _dS )z�Constructor. :param username: User to send as authorization for all requests. :param password: Password to send as authorization for all requests. N)�username�password)r r r r r r �__init__L s zBasicHttpAuthorizer.__init__c C s&