mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-12-24 06:29:27 -05:00
synapse.client.v1.login.LoginFallbackRestServlet and synapse.client.v1.login.PasswordResetRestServlet are unused
This commit is contained in:
parent
5338220d3a
commit
1a934e8bfd
@ -192,36 +192,6 @@ class LoginRestServlet(ClientV1RestServlet):
|
|||||||
return (user, attributes)
|
return (user, attributes)
|
||||||
|
|
||||||
|
|
||||||
class LoginFallbackRestServlet(ClientV1RestServlet):
|
|
||||||
PATTERN = client_path_pattern("/login/fallback$")
|
|
||||||
|
|
||||||
def on_GET(self, request):
|
|
||||||
# TODO(kegan): This should be returning some HTML which is capable of
|
|
||||||
# hitting LoginRestServlet
|
|
||||||
return (200, {})
|
|
||||||
|
|
||||||
|
|
||||||
class PasswordResetRestServlet(ClientV1RestServlet):
|
|
||||||
PATTERN = client_path_pattern("/login/reset")
|
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
|
||||||
def on_POST(self, request):
|
|
||||||
reset_info = _parse_json(request)
|
|
||||||
try:
|
|
||||||
email = reset_info["email"]
|
|
||||||
user_id = reset_info["user_id"]
|
|
||||||
handler = self.handlers.login_handler
|
|
||||||
yield handler.reset_password(user_id, email)
|
|
||||||
# purposefully give no feedback to avoid people hammering different
|
|
||||||
# combinations.
|
|
||||||
defer.returnValue((200, {}))
|
|
||||||
except KeyError:
|
|
||||||
raise SynapseError(
|
|
||||||
400,
|
|
||||||
"Missing keys. Requires 'email' and 'user_id'."
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class SAML2RestServlet(ClientV1RestServlet):
|
class SAML2RestServlet(ClientV1RestServlet):
|
||||||
PATTERN = client_path_pattern("/login/saml2")
|
PATTERN = client_path_pattern("/login/saml2")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user