pagarmeapisdk/http/auth/basic_auth.py
def apply(self, http_request):
        """ Add basic authentication to the request.

        Args:
            http_request (HttpRequest): The HttpRequest object to which
                authentication will be added.

        """
        username = self._basic_auth_user_name
        password = self._basic_auth_password
        joined = "{}:{}".format(username, password)
        encoded = base64.b64encode(str.encode(joined)).decode('iso-8859-1')
        header_value = "Basic {}".format(encoded)
        http_request.headers["Authorization"] = header_value
 Add basic authentication to the request.

        Args:
            http_request (HttpRequest): The HttpRequest object to which
                authentication will be added.

        
Add basic authentication to the request.
Add basic authentication to the request .
def apply(self, http_request):
        username = self._basic_auth_user_name
        password = self._basic_auth_password
        joined = "{}:{}".format(username, password)
        encoded = base64.b64encode(str.encode(joined)).decode('iso-8859-1')
        header_value = "Basic {}".format(encoded)
        http_request.headers["Authorization"] = header_value
def apply ( self , http_request ) : username = self . _basic_auth_user_name password = self . _basic_auth_password joined = "{}:{}" . format ( username , password ) encoded = base64 . b64encode ( str . encode ( joined ) ) . decode ( 'iso-8859-1' ) header_value = "Basic {}" . format ( encoded ) http_request . headers [ "Authorization" ] = header_value
Add basic authentication to the request.
Add basic authentication to the request .
""" Add basic authentication to the request.

        Args:
            http_request (HttpRequest): The HttpRequest object to which
                authentication will be added.

        """
self
http_request
The HttpRequest object to which
authentication will be added.
The HttpRequest object to which authentication will be added .