fix aliyunpan api

This commit is contained in:
jxxghp
2024-06-18 12:01:53 +08:00
parent 90df09e64d
commit 2a333add9b
4 changed files with 210 additions and 49 deletions

View File

@ -87,6 +87,18 @@ def verify_uri_token(token: str = Depends(get_token)) -> str:
return token
def verify_uri_session(token: str = Depends(get_token)) -> str:
"""
通过依赖项使用token进行身份认证
"""
if not verify_token(token):
raise HTTPException(
status_code=status.HTTP_401_UNAUTHORIZED,
detail="token校验不通过"
)
return token
def verify_uri_apikey(apikey: str = Depends(get_apikey)) -> str:
"""
通过依赖项使用apikey进行身份认证