diff --git a/jupyterhub/auth.py b/jupyterhub/auth.py index 8ed982ee..a9f2620c 100644 --- a/jupyterhub/auth.py +++ b/jupyterhub/auth.py @@ -132,7 +132,9 @@ class Authenticator(LoggingConfigurable): if not self.validate_username(username): self.log.warning("Disallowing invalid username %r.", username) return - if self.check_whitelist(username): + + whitelist_pass = yield gen.maybe_future(self.check_whitelist(username)) + if whitelist_pass: return username else: self.log.warning("User %r not in whitelist.", username)