-
Notifications
You must be signed in to change notification settings - Fork 0
/
auth_param.json
71 lines (71 loc) · 1.54 KB
/
auth_param.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
[
{
"name": "empty",
"header": "",
"expected": {}
},
{
"name": "simple auth param",
"header": "a=a",
"expected": { "a": "a" }
},
{
"name": "multiple auth param",
"header": "a=a, b=b, c=c",
"expected": { "a": "a", "b": "b", "c": "c" }
},
{
"name": "dirty auth param",
"header": "a=a,b=b, c=c , d=d , e=e ",
"expected": { "a": "a", "b": "b", "c": "c", "d": "d", "e": "e" },
"canonical": "a=a, b=b, c=c, d=d, e=e"
},
{
"name": "all char",
"header": "a=abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",
"expected": {
"a": "abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
}
},
{
"name": "quoted-string",
"header": "a=\"a\", b=\"b\"",
"expected": { "a": "\"a\"", "b": "\"b\"" }
},
{
"name": "quoted-pair",
"header": "a=\"\\a\", b=\"\\\\\"",
"expected": { "a": "\"a\"", "b": "\"\\\"" },
"canonical": "a=\"a\", b=\"\\\\\""
},
{
"name": "duplicate key",
"header": "a=a,a=a",
"must_fail": true
},
{
"name": "duplicate key with case insensitive",
"header": "a=a,A=a",
"must_fail": true
},
{
"name": "invalid format",
"header": "YWxhZGRpbjpvcGVuc2VzYW1l a=a",
"must_fail": true
},
{
"name": "invalid quoted-string",
"header": "a=\u0000",
"must_fail": true
},
{
"name": "invalid quoted-pair char",
"header": "a=\"\u0000\"",
"must_fail": true
},
{
"name": "invalid quoted-pair syntax",
"header": "a=\"a\\\"",
"must_fail": true
}
]