merge: integrate ZSY customer service and profile capabilities
This commit is contained in:
@@ -49,7 +49,8 @@ async def build_request_context(
|
||||
raise unauthorized()
|
||||
try:
|
||||
context = _authenticator().authenticate(credentials.credentials)
|
||||
context = await IdentityService().resolve(context)
|
||||
if "visitor" not in context.roles:
|
||||
context = await IdentityService().resolve(context)
|
||||
except Exception as exc:
|
||||
# 令牌非法、账号停用、角色读取失败一律按 401 处理,形态完全一致。
|
||||
raise unauthorized() from exc
|
||||
|
||||
Reference in New Issue
Block a user