feat: add auth

This commit is contained in:
2026-05-12 18:14:52 +03:00
parent c263ad704d
commit 16aaae841e

View File

@@ -59,10 +59,10 @@ GET_KYC_SESSION_RESPONSES = {
description='Creates a Beorg KYC session for one hour and returns link, user token and QR code.', description='Creates a Beorg KYC session for one hour and returns link, user token and QR code.',
) )
async def create_kyc( async def create_kyc(
#auth: AuthContext = Depends(require_access_token), auth: AuthContext = Depends(require_access_token),
command: PassKycCommand = Depends(get_pass_kyc_command), command: PassKycCommand = Depends(get_pass_kyc_command),
) -> BeorgKycCreateResponse: ) -> BeorgKycCreateResponse:
result = await command(user_id='01KPKAFN6J1NJBY15DX8JE2QYB') result = await command(user_id=auth.user_id)
return result return result
@@ -74,8 +74,8 @@ async def create_kyc(
description='Returns latest KYC session status, link, QR code and expiration data.', description='Returns latest KYC session status, link, QR code and expiration data.',
) )
async def get_kyc_session( async def get_kyc_session(
#auth: AuthContext = Depends(require_access_token), auth: AuthContext = Depends(require_access_token),
command: GetKycSessionCommand = Depends(get_kyc_session_command), command: GetKycSessionCommand = Depends(get_kyc_session_command),
) -> KycSessionResponse: ) -> KycSessionResponse:
result = await command(user_id='01KPKAFN6J1NJBY15DX8JE2QYB') result = await command(user_id=auth.user_id)
return result return result