示例#1
0
文件: auth.py 项目: MarioJC/calibre
 def __call__(self, data, endpoint):
     path = encode_path(*data.path)
     http_auth_needed = not (endpoint.android_workaround and self.validate_android_cookie(path, data.cookies.get(self.ANDROID_COOKIE)))
     if http_auth_needed:
         self.do_http_auth(data, endpoint)
         if endpoint.android_workaround:
             data.outcookie[self.ANDROID_COOKIE] = synthesize_nonce(self.key_order, path, self.secret)
             data.outcookie[self.ANDROID_COOKIE]['path'] = path
示例#2
0
文件: auth.py 项目: samsabra/calibre
 def __call__(self, data, endpoint):
     path = encode_path(*data.path)
     http_auth_needed = not (endpoint.android_workaround and self.validate_android_cookie(path, data.cookies.get(self.ANDROID_COOKIE)))
     if http_auth_needed:
         self.do_http_auth(data, endpoint)
         if endpoint.android_workaround:
             data.outcookie[self.ANDROID_COOKIE] = synthesize_nonce(self.key_order, path, self.secret)
             data.outcookie[self.ANDROID_COOKIE]['path'] = path