diff options
author | NavaL <mnandri@thoughtworks.com> | 2016-02-03 16:30:15 +0100 |
---|---|---|
committer | NavaL <mnandri@thoughtworks.com> | 2016-02-03 16:30:15 +0100 |
commit | 18c9144baca1f9b0d3a67cc7f96038d086b847d9 (patch) | |
tree | dd31b8447a6fb8f3122fc80826fd2c62c1e85fbe /service/pixelated/resources/auth.py | |
parent | 4873b25259b7ec1c060e32993857a183314eaa66 (diff) |
reverting unnecessary steps to not re-load leap-sessions on re-login, as they are already cached from leap side
- fixing build
Issue #590
Diffstat (limited to 'service/pixelated/resources/auth.py')
-rw-r--r-- | service/pixelated/resources/auth.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/service/pixelated/resources/auth.py b/service/pixelated/resources/auth.py index 4aff06cd..92efaa27 100644 --- a/service/pixelated/resources/auth.py +++ b/service/pixelated/resources/auth.py @@ -30,6 +30,7 @@ from twisted.web import util from twisted.cred import error from twisted.web.resource import IResource, ErrorPage +from pixelated.config.leap import authenticate_user from pixelated.resources import IPixelatedSession @@ -53,7 +54,12 @@ class LeapPasswordChecker(object): return srp_auth.authenticate(credentials.username, credentials.password) except SRPAuthenticationError: raise UnauthorizedLogin() + + def _get_leap_session(srp_auth): + return authenticate_user(self._leap_provider, credentials.username, credentials.password, auth=srp_auth) + d = threads.deferToThread(_validate_credentials) + d.addCallback(_get_leap_session) return d |