home *** CD-ROM | disk | FTP | other *** search
- # Source Generated with Decompyle++
- # File: in.pyc (Python 2.6)
-
- __author__ = 'j.s@google.com (Jeff Scudder)'
- import base64
-
- class BasicAuth(object):
- '''Sets the Authorization header as defined in RFC1945'''
-
- def __init__(self, user_id, password):
- self.basic_cookie = base64.encodestring('%s:%s' % (user_id, password)).strip()
-
-
- def modify_request(self, http_request):
- http_request.headers['Authorization'] = 'Basic %s' % self.basic_cookie
-
- ModifyRequest = modify_request
-
-