mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 10:56:06 -04:00
Stop advertising unsupported flows for registration (#6107)
If email or msisdn verification aren't supported, let's stop advertising them for registration. Fixes #6100.
This commit is contained in:
parent
2cd98812ba
commit
990928abde
5 changed files with 83 additions and 16 deletions
|
@ -61,7 +61,8 @@ class AuthHandler(BaseHandler):
|
|||
self.checkers = {} # type: dict[str, UserInteractiveAuthChecker]
|
||||
for auth_checker_class in INTERACTIVE_AUTH_CHECKERS:
|
||||
inst = auth_checker_class(hs)
|
||||
self.checkers[inst.AUTH_TYPE] = inst
|
||||
if inst.is_enabled():
|
||||
self.checkers[inst.AUTH_TYPE] = inst
|
||||
|
||||
self.bcrypt_rounds = hs.config.bcrypt_rounds
|
||||
|
||||
|
@ -156,6 +157,14 @@ class AuthHandler(BaseHandler):
|
|||
|
||||
return params
|
||||
|
||||
def get_enabled_auth_types(self):
|
||||
"""Return the enabled user-interactive authentication types
|
||||
|
||||
Returns the UI-Auth types which are supported by the homeserver's current
|
||||
config.
|
||||
"""
|
||||
return self.checkers.keys()
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def check_auth(self, flows, clientdict, clientip):
|
||||
"""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue