Esempio n. 1
0
 def test_wrapResourceWeb(self):
     if not getTwistedWeb():
         raise SkipTest("This test requires both twisted.web.")
     from twisted.web.resource import IResource, Resource
     root = Resource()
     wrapped = wrapResource(root, [self.checker])
     self.assertTrue(IResource.providedBy(wrapped))
Esempio n. 2
0
def run_reactor():
    main = CoreServices()
    observer = log.PythonLoggingObserver()
    observer.start()

    if CREDENTIALS:
        checker = BasicCredChecker(CREDENTIALS)
        main = wrapResource(main, [checker], realmName=CORE_ID)

    reactor.listenTCP(CORE_PORT, server.Site(resource=main))
    reactor.suggestThreadPoolSize(pool)
    reactor.run(installSignalHandlers=False)
Esempio n. 3
0
 def set_auth(self, resource):
    passwordfile = ARMORYD_CONF_FILE
    checker = FilePasswordDB(passwordfile)
    realmName = "Armory JSON-RPC App"
    wrapper = wrapResource(resource, [checker], realmName=realmName)
    return wrapper
Esempio n. 4
0
 def test_wrapResourceWeb(self):
     from twisted.web.resource import IResource, Resource
     root = Resource()
     wrapped = wrapResource(root, [self.checker])
     self.assertTrue(IResource.providedBy(wrapped))
 def set_auth(self, resource):
     passwordfile = "credentials.txt" # TODO change to bitcoin credentials
     checker = FilePasswordDB(passwordfile)
     realmName = "Armory JSON-RPC App"
     wrapper = wrapResource(resource, [checker], realmName=realmName)
     return wrapper
Esempio n. 6
0
 def test_wrapResourceWeb(self):
     from twisted.web.resource import IResource, Resource
     root = Resource()
     wrapped = wrapResource(root, [self.checker])
     self.assertTrue(IResource.providedBy(wrapped))
Esempio n. 7
0
 def set_auth(self, resource):
     passwordfile = "credentials.txt"  # TODO change to bitcoin credentials
     checker = FilePasswordDB(passwordfile)
     realmName = "Armory JSON-RPC App"
     wrapper = wrapResource(resource, [checker], realmName=realmName)
     return wrapper