This repository was archived by the owner on Aug 4, 2021. It is now read-only.
File tree 2 files changed +19
-4
lines changed
2 files changed +19
-4
lines changed Original file line number Diff line number Diff line change 13
13
)
14
14
15
15
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
+ ]
17
24
18
25
19
26
async def handle_login (
20
27
request : aiohttp .web .Request
21
- ) -> aiohttp .web .Request :
28
+ ) -> aiohttp .web .StreamResponse :
22
29
"""Begin a new session for the upload process."""
23
30
session_key = hashlib .sha1 (os .urandom (128 )).hexdigest () # nosec
24
31
@@ -71,7 +78,7 @@ async def test_signature(
71
78
digestmod = "sha256"
72
79
).hexdigest ()
73
80
if digest == signature :
74
- return
81
+ return True
75
82
raise aiohttp .web .HTTPUnauthorized (
76
83
reason = "Missing valid query signature"
77
84
)
Original file line number Diff line number Diff line change 5
5
6
6
import aiohttp .web
7
7
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
+ ]
9
17
10
18
11
19
@aiohttp .web .middleware
You can’t perform that action at this time.
0 commit comments