diff options
author | Andrew Morgan <1342360+anoadragon453@users.noreply.github.com> | 2019-08-28 14:59:26 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-28 14:59:26 +0200 |
commit | 71fc04069a5770a204c3514e0237d7374df257a8 (patch) | |
tree | 4f28c947443700b2512237e2184f532b22adb8a9 /synapse/handlers/identity.py | |
parent | Config templating (#5900) (diff) | |
download | synapse-71fc04069a5770a204c3514e0237d7374df257a8.tar.xz |
Use the v2 lookup API for 3PID invites (#5897)
Fixes https://github.com/matrix-org/synapse/issues/5861 Adds support for the v2 lookup API as defined in [MSC2134](https://github.com/matrix-org/matrix-doc/pull/2134). Currently this is only used for 3PID invites. Sytest PR: https://github.com/matrix-org/sytest/pull/679
Diffstat (limited to 'synapse/handlers/identity.py')
-rw-r--r-- | synapse/handlers/identity.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/synapse/handlers/identity.py b/synapse/handlers/identity.py index d199521b58..97daca5fee 100644 --- a/synapse/handlers/identity.py +++ b/synapse/handlers/identity.py @@ -282,3 +282,16 @@ class IdentityHandler(BaseHandler): except HttpResponseException as e: logger.info("Proxied requestToken failed: %r", e) raise e.to_synapse_error() + + +class LookupAlgorithm: + """ + Supported hashing algorithms when performing a 3PID lookup. + + SHA256 - Hashing an (address, medium, pepper) combo with sha256, then url-safe base64 + encoding + NONE - Not performing any hashing. Simply sending an (address, medium) combo in plaintext + """ + + SHA256 = "sha256" + NONE = "none" |