mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-09-05 15:38:19 +08:00
feat(auth): update intercept event type
This commit is contained in:
+2
-2
@@ -94,7 +94,7 @@ class UserChain(ChainBase, metaclass=Singleton):
|
|||||||
return False, "认证失败"
|
return False, "认证失败"
|
||||||
else:
|
else:
|
||||||
logger.debug(f"辅助认证未启用,认证类型 {grant_type} 未实现")
|
logger.debug(f"辅助认证未启用,认证类型 {grant_type} 未实现")
|
||||||
return False, "未实现的认证类型"
|
return False, "不支持的认证类型"
|
||||||
|
|
||||||
def password_authenticate(self, credentials: AuthCredentials) -> Tuple[bool, Union[User, str]]:
|
def password_authenticate(self, credentials: AuthCredentials) -> Tuple[bool, Union[User, str]]:
|
||||||
"""
|
"""
|
||||||
@@ -202,7 +202,7 @@ class UserChain(ChainBase, metaclass=Singleton):
|
|||||||
|
|
||||||
# 触发认证通过的拦截事件
|
# 触发认证通过的拦截事件
|
||||||
intercept_event = self.eventmanager.send_event(
|
intercept_event = self.eventmanager.send_event(
|
||||||
etype=ChainEventType.AuthPassedIntercept,
|
etype=ChainEventType.AuthIntercept,
|
||||||
data=AuthInterceptCredentials(username=username, channel=channel, service=service, token=token)
|
data=AuthInterceptCredentials(username=username, channel=channel, service=service, token=token)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -64,8 +64,8 @@ class ChainEventType(Enum):
|
|||||||
NameRecognize = "name.recognize"
|
NameRecognize = "name.recognize"
|
||||||
# 认证验证请求
|
# 认证验证请求
|
||||||
AuthVerification = "auth.verification"
|
AuthVerification = "auth.verification"
|
||||||
# 认证通过拦截
|
# 认证拦截请求
|
||||||
AuthPassedIntercept = "auth.passed.intercept"
|
AuthIntercept = "auth.intercept"
|
||||||
|
|
||||||
|
|
||||||
# 系统配置Key字典
|
# 系统配置Key字典
|
||||||
|
|||||||
Reference in New Issue
Block a user