diff options
Diffstat (limited to 'src/leap')
-rw-r--r-- | src/leap/soledad/server/_resource.py | 5 | ||||
-rw-r--r-- | src/leap/soledad/server/auth.py | 3 | ||||
-rw-r--r-- | src/leap/soledad/server/entrypoint.py | 7 |
3 files changed, 12 insertions, 3 deletions
diff --git a/src/leap/soledad/server/_resource.py b/src/leap/soledad/server/_resource.py index e4c51ded..c097fad8 100644 --- a/src/leap/soledad/server/_resource.py +++ b/src/leap/soledad/server/_resource.py @@ -55,8 +55,9 @@ class LocalResource(Resource): Used for localhost endpoints, like IncomingBox delivery. """ - def __init__(conf): - pass + def __init__(self): + Resource.__init__(self) + self.putChild('incoming', IncomingResource()) class SoledadResource(Resource): diff --git a/src/leap/soledad/server/auth.py b/src/leap/soledad/server/auth.py index 934517b5..4dbe9a6d 100644 --- a/src/leap/soledad/server/auth.py +++ b/src/leap/soledad/server/auth.py @@ -86,7 +86,7 @@ class LocalServicesRealm(object): conf = get_config() self.anon_resource = SoledadAnonResource( enable_blobs=conf['blobs']) - self.auth_resource = LocalResource(conf) + self.auth_resource = LocalResource() def requestAvatar(self, avatarId, mind, *interfaces): @@ -105,6 +105,7 @@ class LocalServicesRealm(object): @implementer(ICredentialsChecker) class FileTokenChecker(object): + credentialInterfaces = [IUsernamePassword, IAnonymous] def __init__(self, conf=None): conf = conf or get_config() diff --git a/src/leap/soledad/server/entrypoint.py b/src/leap/soledad/server/entrypoint.py index 9b9a5e66..7115007b 100644 --- a/src/leap/soledad/server/entrypoint.py +++ b/src/leap/soledad/server/entrypoint.py @@ -44,7 +44,14 @@ class SoledadEntrypoint(SoledadSession): SoledadSession.__init__(self, portal) +class LocalServicesEntrypoint(SoledadSession): + + def __init__(self): + portal = portalFactory(public=False) + SoledadSession.__init__(self, portal) + # see the comments in application.py recarding why couch state has to be # initialized when the reactor is running + reactor.callWhenRunning(init_couch_state, conf) |