feat: api-key认证

This commit is contained in:
shaohuzhang1 2023-12-11 14:42:28 +08:00
parent 6e31965976
commit 46a45bd085
2 changed files with 2 additions and 2 deletions

View File

@ -41,7 +41,7 @@ class TokenAuth(TokenAuthentication):
application_api_key = QuerySet(ApplicationApiKey).filter(secret_key=auth).first()
if application_api_key is None:
raise AppAuthenticationFailed(500, "secret_key 无效")
if not application_api_key.application.api_key_is_active:
if not application_api_key.is_active:
raise AppAuthenticationFailed(500, "secret_key 无效")
permission_list = [Permission(group=Group.APPLICATION,
operate=Operate.USE,

View File

@ -1,5 +1,5 @@
[tool.poetry]
name = "smart-doc"
name = "maxkb"
version = "0.1.0"
description = "智能客服系统"
authors = ["shaohuzhang1 <shaohu.zhang@fit2cloud.com>"]