use real auth

This commit is contained in:
thomasv 2012-02-22 16:17:24 +01:00
parent 87e4131623
commit c22f839c9e
2 changed files with 3 additions and 15 deletions

View File

@ -46,19 +46,7 @@ if __name__ == '__main__':
interface = Interface()
wallet = Wallet(interface)
wallet.set_path(options.wallet_path)
if options.remote_url:
m = re.match('^(.*?)@(.*?)$', options.remote_url)
# header authentication is not supported
if m:
wallet.remote_url = 'http://'+m.group(2)
wallet.remote_password = m.group(1)
else:
print "bad url"
sys.exit(1)
else:
wallet.remote_url = None
wallet.remote_url = options.remote_url
if len(args)==0:
url = None

View File

@ -491,13 +491,13 @@ class Wallet:
def get_remote_number(self):
import jsonrpclib
server = jsonrpclib.Server(self.remote_url)
out = server.getnum(self.remote_password)
out = server.getnum()
return out
def get_remote_mpk(self):
import jsonrpclib
server = jsonrpclib.Server(self.remote_url)
out = server.getkey(self.remote_password)
out = server.getkey()
return out
def is_found(self):