fix: Password authentication (#3507)

This commit is contained in:
shaohuzhang1 2025-07-08 15:49:55 +08:00 committed by GitHub
parent c99993795d
commit f627daf231
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -45,7 +45,7 @@ class ChatAnonymousUserToken(AuthBaseHandle):
if application_setting_model is not None:
application_setting = QuerySet(application_setting_model).filter(application_id=application_id).first()
if application_setting.authentication:
if 'password' != application_setting.authentication_value.get('type', ''):
if chat_user_token.authentication.auth_type != application_setting.authentication_value.get('type', ''):
raise AppAuthenticationFailed(1002, _('Authentication information is incorrect'))
return None, ChatAuth(
current_role_list=[RoleConstants.CHAT_ANONYMOUS_USER],