summaryrefslogtreecommitdiff
path: root/common/src
diff options
context:
space:
mode:
authorTomás Touceda <chiiph@leap.se>2014-03-18 15:07:55 -0300
committerTomás Touceda <chiiph@leap.se>2014-03-18 15:07:55 -0300
commit6548d7ed36180d6aec4d205a3b3e5e7b4df54987 (patch)
treebadb508a7f330269994a524c8b9e545b12b903f4 /common/src
parentff63167fbb4391a063fdbc29903fdad5a48c55bc (diff)
parent288f506daed66e4acb08617dc1db127da4d36241 (diff)
Merge remote-tracking branch 'refs/remotes/drebs/bug/5191_fix-raise-of-auth-token-error' into develop
Diffstat (limited to 'common/src')
-rw-r--r--common/src/leap/soledad/common/errors.py16
1 files changed, 4 insertions, 12 deletions
diff --git a/common/src/leap/soledad/common/errors.py b/common/src/leap/soledad/common/errors.py
index 446c4c75..3a7eadd2 100644
--- a/common/src/leap/soledad/common/errors.py
+++ b/common/src/leap/soledad/common/errors.py
@@ -51,23 +51,15 @@ class SoledadError(errors.U1DBError):
#
@register_exception
-class MissingAuthTokenError(errors.Unauthorized):
- """
- Exception raised when failing to get authorization for some action because
- the auth token is missing in the tokens db.
- """
-
- wire_description = "missing token"
- status = 401
-
-@register_exception
class InvalidAuthTokenError(errors.Unauthorized):
"""
Exception raised when failing to get authorization for some action because
- the provided token is different from the one in the tokens db.
+ the provided token either does not exist in the tokens database, has a
+ distinct structure from the expected one, or is associated with a user
+ with a distinct uuid than the one provided by the client.
"""
- wire_descrition = "token mismatch"
+ wire_descrition = "invalid auth token"
status = 401
#