This repository was archived by the owner on Aug 4, 2021. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1313)
1414
1515
16- AiohttpHandler = typing .Callable [[aiohttp .web .Request ], aiohttp .web .Response ]
16+ AiohttpHandler = typing .Callable [
17+ [aiohttp .web .Request ],
18+ typing .Coroutine [
19+ typing .Awaitable ,
20+ typing .Any ,
21+ aiohttp .web .Response
22+ ]
23+ ]
1724
1825
1926async def handle_login (
2027 request : aiohttp .web .Request
21- ) -> aiohttp .web .Request :
28+ ) -> aiohttp .web .StreamResponse :
2229 """Begin a new session for the upload process."""
2330 session_key = hashlib .sha1 (os .urandom (128 )).hexdigest () # nosec
2431
@@ -71,7 +78,7 @@ async def test_signature(
7178 digestmod = "sha256"
7279 ).hexdigest ()
7380 if digest == signature :
74- return
81+ return True
7582 raise aiohttp .web .HTTPUnauthorized (
7683 reason = "Missing valid query signature"
7784 )
Original file line number Diff line number Diff line change 55
66import aiohttp .web
77
8- AiohttpHandler = typing .Callable [[aiohttp .web .Request ], aiohttp .web .Response ]
8+
9+ AiohttpHandler = typing .Callable [
10+ [aiohttp .web .Request ],
11+ typing .Coroutine [
12+ typing .Awaitable ,
13+ typing .Any ,
14+ aiohttp .web .Response
15+ ]
16+ ]
917
1018
1119@aiohttp .web .middleware
You can’t perform that action at this time.
0 commit comments