-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_data.go
120 lines (107 loc) · 2.95 KB
/
test_data.go
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
package auth
// configTestData will return a map of test data containing valid and invalid Authorization configs.
//
//nolint:lll
func configTestData() map[string]string {
return map[string]string{
"empty": ``,
"valid": `
jwt:
key: kYzJdnpm6Lj2E7AobZ35RE2itZ2ws82U5tcxrVmeQq1gA4mUfzYQ9t9U
issuer: FTeX, Inc.
expirationDuration: 600
refreshThreshold: 60
general:
bcryptCost: 8
cryptoSecret: Xp2s5v8y/B?E(H+MbQeShVmYq3t6w9z$`,
"no_issuer": `
jwt:
key: kYzJdnpm6Lj2E7AobZ35RE2itZ2ws82U5tcxrVmeQq1gA4mUfzYQ9t9U
expirationDuration: 600
refreshThreshold: 60
general:
bcryptCost: 8
cryptoSecret: Xp2s5v8y/B?E(H+MbQeShVmYq3t6w9z$`,
"bcrypt_cost_below_4": `
jwt:
key: kYzJdnpm6Lj2E7AobZ35RE2itZ2ws82U5tcxrVmeQq1gA4mUfzYQ9t9U
issuer: FTeX, Inc.
expirationDuration: 600
refreshThreshold: 60
general:
bcryptCost: 2
cryptoSecret: Xp2s5v8y/B?E(H+MbQeShVmYq3t6w9z$`,
"bcrypt_cost_above_31": `
jwt:
key: kYzJdnpm6Lj2E7AobZ35RE2itZ2ws82U5tcxrVmeQq1gA4mUfzYQ9t9U
issuer: FTeX, Inc.
expirationDuration: 600
refreshThreshold: 60
general:
bcryptCost: 32
cryptoSecret: Xp2s5v8y/B?E(H+MbQeShVmYq3t6w9z$`,
"jwt_expiration_below_60s": `
jwt:
key: kYzJdnpm6Lj2E7AobZ35RE2itZ2ws82U5tcxrVmeQq1gA4mUfzYQ9t9U
issuer: FTeX, Inc.
expirationDuration: 59
refreshThreshold: 40
general:
bcryptCost: 8
cryptoSecret: Xp2s5v8y/B?E(H+MbQeShVmYq3t6w9z$`,
"jwt_key_below_8": `
jwt:
key: kYzJdnp
issuer: FTeX, Inc.
expirationDuration: 600
refreshThreshold: 60
general:
bcryptCost: 8
cryptoSecret: Xp2s5v8y/B?E(H+MbQeShVmYq3t6w9z$`,
"jwt_key_above_256": `
jwt:
key: kYzJdnpm6Lj2E7AobZ35RE2itZ2ws82U5tcxrVmeQq1gA4mUfzYQ9t9UkYzJdnpm6Lj2E7AobZ35RE2itZ2ws82U5tcxrVmeQq1gA4mUfzYQ9t9UkYzJdnpm6Lj2E7AobZ35RE2itZ2ws82U5tcxrVmeQq1gA4mUfzYQ9t9UkYzJdnpm6Lj2E7AobZ35RE2itZ2ws82U5tcxrVmeQq1gA4mUfzYQ9t9UkYzJdnpm6Lj2E7AobZ35RE2itZ2ws82U5
issuer: FTeX, Inc.
expirationDuration: 600
refreshThreshold: 60
general:
bcryptCost: 8
cryptoSecret: Xp2s5v8y/B?E(H+MbQeShVmYq3t6w9z$`,
"low_refresh_threshold": `
jwt:
key: kYzJdnpm6Lj2E7AobZ35RE2itZ2ws82U5tcxrVmeQq1gA4mUfzYQ9t9U
issuer: FTeX, Inc.
expirationDuration: 600
refreshThreshold: 0
general:
bcryptCost: 8
cryptoSecret: Xp2s5v8y/B?E(H+MbQeShVmYq3t6w9z$`,
"refresh_threshold_gt_expiration": `
jwt:
key: kYzJdnpm6Lj2E7AobZ35RE2itZ2ws82U5tcxrVmeQq1gA4mUfzYQ9t9U
issuer: FTeX, Inc.
expirationDuration: 600
refreshThreshold: 601
general:
bcryptCost: 8
cryptoSecret: Xp2s5v8y/B?E(H+MbQeShVmYq3t6w9z$`,
"crypto_key_too_short": `
jwt:
key: kYzJdnpm6Lj2E7AobZ35RE2itZ2ws82U5tcxrVmeQq1gA4mUfzYQ9t9U
issuer: FTeX, Inc.
expirationDuration: 600
refreshThreshold: 60
general:
bcryptCost: 8
cryptoSecret: Xp2s5v8y/B?E(H+MbQeShVmYq3t6w9z`,
"crypto_key_too_long": `
jwt:
key: kYzJdnpm6Lj2E7AobZ35RE2itZ2ws82U5tcxrVmeQq1gA4mUfzYQ9t9U
issuer: FTeX, Inc.
expirationDuration: 600
refreshThreshold: 60
general:
bcryptCost: 8
cryptoSecret: Xp2s5v8y/B?E(H+MbQeShVmYq3t6w9z$*`,
}
}