auth: Rename authentication_method session var.

This commit is contained in:
Mateusz Mandera 2023-05-23 14:48:20 +02:00 committed by Tim Abbott
parent 903090c582
commit 01498add9b
1 changed files with 2 additions and 2 deletions

View File

@ -1888,7 +1888,7 @@ class SocialAuthMixin(ZulipAuthMixin, ExternalAuthMethod, BaseAuth):
Specifies a dict of keys:values to be saved in the user's session
after successfully authenticating.
"""
return {"authentication_method": self.name}
return {"social_auth_backend": self.name}
@classmethod
def dict_representation(cls, realm: Optional[Realm] = None) -> List[ExternalAuthMethodDictT]:
@ -2719,7 +2719,7 @@ class SAMLAuthBackend(SocialAuthMixin, SAMLAuth):
def get_params_to_store_in_authenticated_session(self) -> Dict[str, str]:
idp_name = self.strategy.session_get("saml_idp_name")
return {"authentication_method": f"saml:{idp_name}"}
return {"social_auth_backend": f"saml:{idp_name}"}
def patch_saml_auth_require_messages_signed(auth: OneLogin_Saml2_Auth) -> None: