diff options
author | Erik Johnston <erik@matrix.org> | 2015-11-20 17:38:58 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2015-11-20 17:38:58 +0000 |
commit | 2ca01ed7470bd1fb0aa9cab0ad0546ea2911b682 (patch) | |
tree | d5d1c71f050d27e929daa72954704ad330cc9194 /synapse/rest/client/v1 | |
parent | Merge branch 'hotfixes-v0.11.0-r2' of github.com:matrix-org/synapse (diff) | |
parent | Merge branch 'erikj/perspective_limiter' into release-v0.11.1 (diff) | |
download | synapse-2ca01ed7470bd1fb0aa9cab0ad0546ea2911b682.tar.xz |
Merge branch 'release-v0.11.1' of github.com:matrix-org/synapse v0.11.1
Diffstat (limited to 'synapse/rest/client/v1')
-rw-r--r-- | synapse/rest/client/v1/login.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/synapse/rest/client/v1/login.py b/synapse/rest/client/v1/login.py index 0171f6c018..720d6358e7 100644 --- a/synapse/rest/client/v1/login.py +++ b/synapse/rest/client/v1/login.py @@ -58,9 +58,18 @@ class LoginRestServlet(ClientV1RestServlet): flows.append({"type": LoginRestServlet.SAML2_TYPE}) if self.cas_enabled: flows.append({"type": LoginRestServlet.CAS_TYPE}) + + # While its valid for us to advertise this login type generally, + # synapse currently only gives out these tokens as part of the + # CAS login flow. + # Generally we don't want to advertise login flows that clients + # don't know how to implement, since they (currently) will always + # fall back to the fallback API if they don't understand one of the + # login flow types returned. + flows.append({"type": LoginRestServlet.TOKEN_TYPE}) if self.password_enabled: flows.append({"type": LoginRestServlet.PASS_TYPE}) - flows.append({"type": LoginRestServlet.TOKEN_TYPE}) + return (200, {"flows": flows}) def on_OPTIONS(self, request): |