summary refs log tree commit diff
path: root/synapse/api/errors.py
diff options
context:
space:
mode:
authorAndrew Morgan <andrew@amorgan.xyz>2020-02-17 17:17:02 +0000
committerAndrew Morgan <andrew@amorgan.xyz>2020-02-17 17:17:02 +0000
commit2f450fa1494d3bad36ab5615762c1ff8ff5053b5 (patch)
treec9a05f23163cde235f62611c72956b0a81cfe8d3 /synapse/api/errors.py
parentUpdate reverse_proxy.rst (#5397) (diff)
parentImplement access token expiry (#5660) (diff)
downloadsynapse-2f450fa1494d3bad36ab5615762c1ff8ff5053b5.tar.xz
Implement access token expiry (#5660)
Diffstat (limited to 'synapse/api/errors.py')
-rw-r--r--synapse/api/errors.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/synapse/api/errors.py b/synapse/api/errors.py

index 8f0b0c424e..1e8fed0ae6 100644 --- a/synapse/api/errors.py +++ b/synapse/api/errors.py
@@ -253,8 +253,14 @@ class MissingClientTokenError(InvalidClientCredentialsError): class InvalidClientTokenError(InvalidClientCredentialsError): """Raised when we didn't understand the access token in a request""" - def __init__(self, msg="Unrecognised access token"): + def __init__(self, msg="Unrecognised access token", soft_logout=False): super().__init__(msg=msg, errcode="M_UNKNOWN_TOKEN") + self._soft_logout = soft_logout + + def error_dict(self): + d = super().error_dict() + d["soft_logout"] = self._soft_logout + return d class ResourceLimitError(SynapseError):