Commit a76dd57
committed
Make r.m.authorization/parse-authorization public
Make the existing ring.middleware.authorization/parse-authorization
function public and make it take the Authorization header value as
input.
According to RFC 7235 Section 2 and RFC 9110 Section 11, the value
credentials of the Authorization HTTP request header has the same
structure as each of the comma-separated challenges of the
WWW-Authenticate HTTP response header, which allows to reuse this
function also for parsing responses:
* https://datatracker.ietf.org/doc/html/rfc7235#section-2
* https://datatracker.ietf.org/doc/html/rfc9110#section-111 parent 990a379 commit a76dd57
File tree
2 files changed
+34
-27
lines changed- src/ring/middleware
- test/ring/middleware
2 files changed
+34
-27
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
20 | 27 | | |
21 | | - | |
22 | | - | |
| 28 | + | |
23 | 29 | | |
24 | 30 | | |
25 | 31 | | |
| |||
37 | 43 | | |
38 | 44 | | |
39 | 45 | | |
40 | | - | |
| 46 | + | |
41 | 47 | | |
42 | 48 | | |
43 | 49 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
| 5 | + | |
12 | 6 | | |
13 | | - | |
14 | | - | |
15 | | - | |
| 7 | + | |
16 | 8 | | |
17 | 9 | | |
18 | | - | |
19 | | - | |
20 | | - | |
| 10 | + | |
21 | 11 | | |
22 | 12 | | |
23 | | - | |
24 | | - | |
25 | | - | |
| 13 | + | |
26 | 14 | | |
27 | 15 | | |
28 | 16 | | |
29 | | - | |
30 | | - | |
31 | | - | |
| 17 | + | |
32 | 18 | | |
33 | 19 | | |
34 | 20 | | |
35 | 21 | | |
36 | 22 | | |
37 | | - | |
38 | | - | |
39 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
40 | 33 | | |
41 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| |||
0 commit comments