use real auth
This commit is contained in:
parent
87e4131623
commit
c22f839c9e
|
@ -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
|
||||
|
|
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue