Commit afa3658
committed
Provide parse-credentials function to parse Authorization or WWW-Authenticate headers
Modify the existing `parse-authorization` function to take the
`Authorization` header value as input and make it public.
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 `challenge`s 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 19baf42 commit afa3658
1 file changed
Lines changed: 8 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
20 | 25 | | |
21 | | - | |
22 | | - | |
| 26 | + | |
23 | 27 | | |
24 | 28 | | |
25 | 29 | | |
| |||
37 | 41 | | |
38 | 42 | | |
39 | 43 | | |
40 | | - | |
| 44 | + | |
41 | 45 | | |
42 | 46 | | |
43 | 47 | | |
| |||
0 commit comments