prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Update SSO UIAuth login identifier to m.login.sso
  I'm not sure when exactly we do this, but [MSC2454](https://github.com/matrix-org/matrix-doc/pull/2454) was merged which identified `m.login.sso` as the identifier for SSO + UIAuth. Synapse is currently using `org.matrix.login.sso`. At some point we should switch to the standardized version.
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `synapse/api/constants.py`
  Content:
  ```
  1 # -*- coding: utf-8 -*-
  2 # Copyright 2014-2016 OpenMarket Ltd
  3 # Copyright 2017 Vector Creations Ltd
  4 # Copyright 2018-2019 New Vector Ltd
  5 # Copyright 2019 The Matrix.org Foundation C.I.C.
  6 #
  7 # Licensed under the Apache License, Version 2.0 (the "License");
  8 # you may not use this file except in compliance with the License.
  9 # You may obtain a copy of the License at
  10 #
  11 #     http://www.apache.org/licenses/LICENSE-2.0
  12 #
  13 # Unless required by applicable law or agreed to in writing, software
  14 # distributed under the License is distributed on an "AS IS" BASIS,
  15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  16 # See the License for the specific language governing permissions and
  17 # limitations under the License.
  18 
  19 """Contains constants from the specification."""
  20 
  21 # the "depth" field on events is limited to 2**63 - 1
  22 MAX_DEPTH = 2 ** 63 - 1
  23 
  24 # the maximum length for a room alias is 255 characters
  25 MAX_ALIAS_LENGTH = 255
  26 
  27 # the maximum length for a user id is 255 characters
  28 MAX_USERID_LENGTH = 255
  29 
  30 
  31 class Membership(object):
  32 
  33     """Represents the membership states of a user in a room."""
  34 
  35     INVITE = "invite"
  36     JOIN = "join"
  37     KNOCK = "knock"
  38     LEAVE = "leave"
  39     BAN = "ban"
  40     LIST = (INVITE, JOIN, KNOCK, LEAVE, BAN)
  41 
  42 
  43 class PresenceState(object):
  44     """Represents the presence state of a user."""
  45 
  46     OFFLINE = "offline"
  47     UNAVAILABLE = "unavailable"
  48     ONLINE = "online"
  49 
  50 
  51 class JoinRules(object):
  52     PUBLIC = "public"
  53     KNOCK = "knock"
  54     INVITE = "invite"
  55     PRIVATE = "private"
  56 
  57 
  58 class LoginType(object):
  59     PASSWORD = "m.login.password"
  60     EMAIL_IDENTITY = "m.login.email.identity"
  61     MSISDN = "m.login.msisdn"
  62     RECAPTCHA = "m.login.recaptcha"
  63     TERMS = "m.login.terms"
  64     SSO = "org.matrix.login.sso"
  65     DUMMY = "m.login.dummy"
  66 
  67     # Only for C/S API v1
  68     APPLICATION_SERVICE = "m.login.application_service"
  69     SHARED_SECRET = "org.matrix.login.shared_secret"
  70 
  71 
  72 class EventTypes(object):
  73     Member = "m.room.member"
  74     Create = "m.room.create"
  75     Tombstone = "m.room.tombstone"
  76     JoinRules = "m.room.join_rules"
  77     PowerLevels = "m.room.power_levels"
  78     Aliases = "m.room.aliases"
  79     Redaction = "m.room.redaction"
  80     ThirdPartyInvite = "m.room.third_party_invite"
  81     RelatedGroups = "m.room.related_groups"
  82 
  83     RoomHistoryVisibility = "m.room.history_visibility"
  84     CanonicalAlias = "m.room.canonical_alias"
  85     Encrypted = "m.room.encrypted"
  86     RoomAvatar = "m.room.avatar"
  87     RoomEncryption = "m.room.encryption"
  88     GuestAccess = "m.room.guest_access"
  89 
  90     # These are used for validation
  91     Message = "m.room.message"
  92     Topic = "m.room.topic"
  93     Name = "m.room.name"
  94 
  95     ServerACL = "m.room.server_acl"
  96     Pinned = "m.room.pinned_events"
  97 
  98     Retention = "m.room.retention"
  99 
  100     Presence = "m.presence"
  101 
  102 
  103 class RejectedReason(object):
  104     AUTH_ERROR = "auth_error"
  105 
  106 
  107 class RoomCreationPreset(object):
  108     PRIVATE_CHAT = "private_chat"
  109     PUBLIC_CHAT = "public_chat"
  110     TRUSTED_PRIVATE_CHAT = "trusted_private_chat"
  111 
  112 
  113 class ThirdPartyEntityKind(object):
  114     USER = "user"
  115     LOCATION = "location"
  116 
  117 
  118 ServerNoticeMsgType = "m.server_notice"
  119 ServerNoticeLimitReached = "m.server_notice.usage_limit_reached"
  120 
  121 
  122 class UserTypes(object):
  123     """Allows for user type specific behaviour. With the benefit of hindsight
  124     'admin' and 'guest' users should also be UserTypes. Normal users are type None
  125     """
  126 
  127     SUPPORT = "support"
  128     BOT = "bot"
  129     ALL_USER_TYPES = (SUPPORT, BOT)
  130 
  131 
  132 class RelationTypes(object):
  133     """The types of relations known to this server.
  134     """
  135 
  136     ANNOTATION = "m.annotation"
  137     REPLACE = "m.replace"
  138     REFERENCE = "m.reference"
  139 
  140 
  141 class LimitBlockingTypes(object):
  142     """Reasons that a server may be blocked"""
  143 
  144     MONTHLY_ACTIVE_USER = "monthly_active_user"
  145     HS_DISABLED = "hs_disabled"
  146 
  147 
  148 class EventContentFields(object):
  149     """Fields found in events' content, regardless of type."""
  150 
  151     # Labels for the event, cf https://github.com/matrix-org/matrix-doc/pull/2326
  152     LABELS = "org.matrix.labels"
  153 
  154     # Timestamp to delete the event after
  155     # cf https://github.com/matrix-org/matrix-doc/pull/2228
  156     SELF_DESTRUCT_AFTER = "org.matrix.self_destruct_after"
  157
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/synapse/api/constants.py b/synapse/api/constants.py
  --- a/synapse/api/constants.py
  +++ b/synapse/api/constants.py
  @@ -61,7 +61,7 @@
       MSISDN = "m.login.msisdn"
       RECAPTCHA = "m.login.recaptcha"
       TERMS = "m.login.terms"
  -    SSO = "org.matrix.login.sso"
  +    SSO = "m.login.sso"
       DUMMY = "m.login.dummy"
   
       # Only for C/S API v1
  
verification_info: {"golden_diff": "diff --git a/synapse/api/constants.py b/synapse/api/constants.py\n--- a/synapse/api/constants.py\n+++ b/synapse/api/constants.py\n@@ -61,7 +61,7 @@\n     MSISDN = \"m.login.msisdn\"\n     RECAPTCHA = \"m.login.recaptcha\"\n     TERMS = \"m.login.terms\"\n-    SSO = \"org.matrix.login.sso\"\n+    SSO = \"m.login.sso\"\n     DUMMY = \"m.login.dummy\"\n \n     # Only for C/S API v1\n", "issue": "Update SSO UIAuth login identifier to m.login.sso\nI'm not sure when exactly we do this, but [MSC2454](https://github.com/matrix-org/matrix-doc/pull/2454) was merged which identified `m.login.sso` as the identifier for SSO + UIAuth. Synapse is currently using `org.matrix.login.sso`. At some point we should switch to the standardized version.\n", "before_files": [{"content": "# -*- coding: utf-8 -*-\n# Copyright 2014-2016 OpenMarket Ltd\n# Copyright 2017 Vector Creations Ltd\n# Copyright 2018-2019 New Vector Ltd\n# Copyright 2019 The Matrix.org Foundation C.I.C.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n\"\"\"Contains constants from the specification.\"\"\"\n\n# the \"depth\" field on events is limited to 2**63 - 1\nMAX_DEPTH = 2 ** 63 - 1\n\n# the maximum length for a room alias is 255 characters\nMAX_ALIAS_LENGTH = 255\n\n# the maximum length for a user id is 255 characters\nMAX_USERID_LENGTH = 255\n\n\nclass Membership(object):\n\n    \"\"\"Represents the membership states of a user in a room.\"\"\"\n\n    INVITE = \"invite\"\n    JOIN = \"join\"\n    KNOCK = \"knock\"\n    LEAVE = \"leave\"\n    BAN = \"ban\"\n    LIST = (INVITE, JOIN, KNOCK, LEAVE, BAN)\n\n\nclass PresenceState(object):\n    \"\"\"Represents the presence state of a user.\"\"\"\n\n    OFFLINE = \"offline\"\n    UNAVAILABLE = \"unavailable\"\n    ONLINE = \"online\"\n\n\nclass JoinRules(object):\n    PUBLIC = \"public\"\n    KNOCK = \"knock\"\n    INVITE = \"invite\"\n    PRIVATE = \"private\"\n\n\nclass LoginType(object):\n    PASSWORD = \"m.login.password\"\n    EMAIL_IDENTITY = \"m.login.email.identity\"\n    MSISDN = \"m.login.msisdn\"\n    RECAPTCHA = \"m.login.recaptcha\"\n    TERMS = \"m.login.terms\"\n    SSO = \"org.matrix.login.sso\"\n    DUMMY = \"m.login.dummy\"\n\n    # Only for C/S API v1\n    APPLICATION_SERVICE = \"m.login.application_service\"\n    SHARED_SECRET = \"org.matrix.login.shared_secret\"\n\n\nclass EventTypes(object):\n    Member = \"m.room.member\"\n    Create = \"m.room.create\"\n    Tombstone = \"m.room.tombstone\"\n    JoinRules = \"m.room.join_rules\"\n    PowerLevels = \"m.room.power_levels\"\n    Aliases = \"m.room.aliases\"\n    Redaction = \"m.room.redaction\"\n    ThirdPartyInvite = \"m.room.third_party_invite\"\n    RelatedGroups = \"m.room.related_groups\"\n\n    RoomHistoryVisibility = \"m.room.history_visibility\"\n    CanonicalAlias = \"m.room.canonical_alias\"\n    Encrypted = \"m.room.encrypted\"\n    RoomAvatar = \"m.room.avatar\"\n    RoomEncryption = \"m.room.encryption\"\n    GuestAccess = \"m.room.guest_access\"\n\n    # These are used for validation\n    Message = \"m.room.message\"\n    Topic = \"m.room.topic\"\n    Name = \"m.room.name\"\n\n    ServerACL = \"m.room.server_acl\"\n    Pinned = \"m.room.pinned_events\"\n\n    Retention = \"m.room.retention\"\n\n    Presence = \"m.presence\"\n\n\nclass RejectedReason(object):\n    AUTH_ERROR = \"auth_error\"\n\n\nclass RoomCreationPreset(object):\n    PRIVATE_CHAT = \"private_chat\"\n    PUBLIC_CHAT = \"public_chat\"\n    TRUSTED_PRIVATE_CHAT = \"trusted_private_chat\"\n\n\nclass ThirdPartyEntityKind(object):\n    USER = \"user\"\n    LOCATION = \"location\"\n\n\nServerNoticeMsgType = \"m.server_notice\"\nServerNoticeLimitReached = \"m.server_notice.usage_limit_reached\"\n\n\nclass UserTypes(object):\n    \"\"\"Allows for user type specific behaviour. With the benefit of hindsight\n    'admin' and 'guest' users should also be UserTypes. Normal users are type None\n    \"\"\"\n\n    SUPPORT = \"support\"\n    BOT = \"bot\"\n    ALL_USER_TYPES = (SUPPORT, BOT)\n\n\nclass RelationTypes(object):\n    \"\"\"The types of relations known to this server.\n    \"\"\"\n\n    ANNOTATION = \"m.annotation\"\n    REPLACE = \"m.replace\"\n    REFERENCE = \"m.reference\"\n\n\nclass LimitBlockingTypes(object):\n    \"\"\"Reasons that a server may be blocked\"\"\"\n\n    MONTHLY_ACTIVE_USER = \"monthly_active_user\"\n    HS_DISABLED = \"hs_disabled\"\n\n\nclass EventContentFields(object):\n    \"\"\"Fields found in events' content, regardless of type.\"\"\"\n\n    # Labels for the event, cf https://github.com/matrix-org/matrix-doc/pull/2326\n    LABELS = \"org.matrix.labels\"\n\n    # Timestamp to delete the event after\n    # cf https://github.com/matrix-org/matrix-doc/pull/2228\n    SELF_DESTRUCT_AFTER = \"org.matrix.self_destruct_after\"\n", "path": "synapse/api/constants.py"}], "after_files": [{"content": "# -*- coding: utf-8 -*-\n# Copyright 2014-2016 OpenMarket Ltd\n# Copyright 2017 Vector Creations Ltd\n# Copyright 2018-2019 New Vector Ltd\n# Copyright 2019 The Matrix.org Foundation C.I.C.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n\"\"\"Contains constants from the specification.\"\"\"\n\n# the \"depth\" field on events is limited to 2**63 - 1\nMAX_DEPTH = 2 ** 63 - 1\n\n# the maximum length for a room alias is 255 characters\nMAX_ALIAS_LENGTH = 255\n\n# the maximum length for a user id is 255 characters\nMAX_USERID_LENGTH = 255\n\n\nclass Membership(object):\n\n    \"\"\"Represents the membership states of a user in a room.\"\"\"\n\n    INVITE = \"invite\"\n    JOIN = \"join\"\n    KNOCK = \"knock\"\n    LEAVE = \"leave\"\n    BAN = \"ban\"\n    LIST = (INVITE, JOIN, KNOCK, LEAVE, BAN)\n\n\nclass PresenceState(object):\n    \"\"\"Represents the presence state of a user.\"\"\"\n\n    OFFLINE = \"offline\"\n    UNAVAILABLE = \"unavailable\"\n    ONLINE = \"online\"\n\n\nclass JoinRules(object):\n    PUBLIC = \"public\"\n    KNOCK = \"knock\"\n    INVITE = \"invite\"\n    PRIVATE = \"private\"\n\n\nclass LoginType(object):\n    PASSWORD = \"m.login.password\"\n    EMAIL_IDENTITY = \"m.login.email.identity\"\n    MSISDN = \"m.login.msisdn\"\n    RECAPTCHA = \"m.login.recaptcha\"\n    TERMS = \"m.login.terms\"\n    SSO = \"m.login.sso\"\n    DUMMY = \"m.login.dummy\"\n\n    # Only for C/S API v1\n    APPLICATION_SERVICE = \"m.login.application_service\"\n    SHARED_SECRET = \"org.matrix.login.shared_secret\"\n\n\nclass EventTypes(object):\n    Member = \"m.room.member\"\n    Create = \"m.room.create\"\n    Tombstone = \"m.room.tombstone\"\n    JoinRules = \"m.room.join_rules\"\n    PowerLevels = \"m.room.power_levels\"\n    Aliases = \"m.room.aliases\"\n    Redaction = \"m.room.redaction\"\n    ThirdPartyInvite = \"m.room.third_party_invite\"\n    RelatedGroups = \"m.room.related_groups\"\n\n    RoomHistoryVisibility = \"m.room.history_visibility\"\n    CanonicalAlias = \"m.room.canonical_alias\"\n    Encrypted = \"m.room.encrypted\"\n    RoomAvatar = \"m.room.avatar\"\n    RoomEncryption = \"m.room.encryption\"\n    GuestAccess = \"m.room.guest_access\"\n\n    # These are used for validation\n    Message = \"m.room.message\"\n    Topic = \"m.room.topic\"\n    Name = \"m.room.name\"\n\n    ServerACL = \"m.room.server_acl\"\n    Pinned = \"m.room.pinned_events\"\n\n    Retention = \"m.room.retention\"\n\n    Presence = \"m.presence\"\n\n\nclass RejectedReason(object):\n    AUTH_ERROR = \"auth_error\"\n\n\nclass RoomCreationPreset(object):\n    PRIVATE_CHAT = \"private_chat\"\n    PUBLIC_CHAT = \"public_chat\"\n    TRUSTED_PRIVATE_CHAT = \"trusted_private_chat\"\n\n\nclass ThirdPartyEntityKind(object):\n    USER = \"user\"\n    LOCATION = \"location\"\n\n\nServerNoticeMsgType = \"m.server_notice\"\nServerNoticeLimitReached = \"m.server_notice.usage_limit_reached\"\n\n\nclass UserTypes(object):\n    \"\"\"Allows for user type specific behaviour. With the benefit of hindsight\n    'admin' and 'guest' users should also be UserTypes. Normal users are type None\n    \"\"\"\n\n    SUPPORT = \"support\"\n    BOT = \"bot\"\n    ALL_USER_TYPES = (SUPPORT, BOT)\n\n\nclass RelationTypes(object):\n    \"\"\"The types of relations known to this server.\n    \"\"\"\n\n    ANNOTATION = \"m.annotation\"\n    REPLACE = \"m.replace\"\n    REFERENCE = \"m.reference\"\n\n\nclass LimitBlockingTypes(object):\n    \"\"\"Reasons that a server may be blocked\"\"\"\n\n    MONTHLY_ACTIVE_USER = \"monthly_active_user\"\n    HS_DISABLED = \"hs_disabled\"\n\n\nclass EventContentFields(object):\n    \"\"\"Fields found in events' content, regardless of type.\"\"\"\n\n    # Labels for the event, cf https://github.com/matrix-org/matrix-doc/pull/2326\n    LABELS = \"org.matrix.labels\"\n\n    # Timestamp to delete the event after\n    # cf https://github.com/matrix-org/matrix-doc/pull/2228\n    SELF_DESTRUCT_AFTER = \"org.matrix.self_destruct_after\"\n", "path": "synapse/api/constants.py"}]}