feat: api-key认证
This commit is contained in:
parent
6e31965976
commit
46a45bd085
|
@ -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,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
[tool.poetry]
|
||||
name = "smart-doc"
|
||||
name = "maxkb"
|
||||
version = "0.1.0"
|
||||
description = "智能客服系统"
|
||||
authors = ["shaohuzhang1 <shaohu.zhang@fit2cloud.com>"]
|
||||
|
|
Loading…
Reference in New Issue