diff options
author | drebs <drebs@leap.se> | 2013-04-30 17:41:31 -0300 |
---|---|---|
committer | drebs <drebs@leap.se> | 2013-04-30 17:41:31 -0300 |
commit | 516a5adb4f8328bd94446f4ea7ad0bc9298d7bfb (patch) | |
tree | 7ce57bc0a824a31e519ee18cebe11e3e1918ef97 /src/leap/soledad/server.py | |
parent | 1e9b0e85a5de03f399c0cf52f46458dc6e77e103 (diff) |
Use uuid instead of address.
Diffstat (limited to 'src/leap/soledad/server.py')
-rw-r--r-- | src/leap/soledad/server.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/leap/soledad/server.py b/src/leap/soledad/server.py index 3d3c6f69..38bf31fd 100644 --- a/src/leap/soledad/server.py +++ b/src/leap/soledad/server.py @@ -125,25 +125,25 @@ class SoledadAuthMiddleware(object): return self._error( start_response, 401, "unauthorized", "Missing Token Authentication") - address, token = encoded.decode('base64').split(':', 1) + uuid, token = encoded.decode('base64').split(':', 1) try: - self.verify_token(environ, address, token) + self.verify_token(environ, uuid, token) except Unauthorized: return self._error( start_response, 401, "unauthorized", - "Incorrect address or token.") + "Incorrect uuid or token.") del environ['HTTP_AUTHORIZATION'] shift_path_info(environ) return self.app(environ, start_response) - def verify_token(self, environ, address, token): + def verify_token(self, environ, uuid, token): """ Verify if token is valid for authenticating this request. @param environ: Dictionary containing CGI variables. @type environ: dict - @param token: The user address. - @type token: str + @param uuid: The user's uuid. + @type uuid: str @param token: The authentication token. @type token: str |