@@ -156,14 +156,14 @@ func TestJWT_combinations(t *testing.T) {
156
156
config : Config {
157
157
SigningKey : validKey ,
158
158
},
159
- expectError : "code=401 , message=missing or malformed jwt, internal=invalid value in request header" ,
159
+ expectError : "code=400 , message=missing or malformed jwt, internal=invalid value in request header" ,
160
160
},
161
161
{
162
162
name : "Empty header auth field" ,
163
163
config : Config {
164
164
SigningKey : validKey ,
165
165
},
166
- expectError : "code=401 , message=missing or malformed jwt, internal=invalid value in request header" ,
166
+ expectError : "code=400 , message=missing or malformed jwt, internal=invalid value in request header" ,
167
167
},
168
168
{
169
169
name : "Valid query method" ,
@@ -180,7 +180,7 @@ func TestJWT_combinations(t *testing.T) {
180
180
TokenLookup : "query:jwt" ,
181
181
},
182
182
reqURL : "/?a=b&jwtxyz=" + token ,
183
- expectError : "code=401 , message=missing or malformed jwt, internal=missing value in the query string" ,
183
+ expectError : "code=400 , message=missing or malformed jwt, internal=missing value in the query string" ,
184
184
},
185
185
{
186
186
name : "Invalid query param value" ,
@@ -198,7 +198,7 @@ func TestJWT_combinations(t *testing.T) {
198
198
TokenLookup : "query:jwt" ,
199
199
},
200
200
reqURL : "/?a=b" ,
201
- expectError : "code=401 , message=missing or malformed jwt, internal=missing value in the query string" ,
201
+ expectError : "code=400 , message=missing or malformed jwt, internal=missing value in the query string" ,
202
202
},
203
203
{
204
204
config : Config {
@@ -239,7 +239,7 @@ func TestJWT_combinations(t *testing.T) {
239
239
SigningKey : validKey ,
240
240
TokenLookup : "cookie:jwt" ,
241
241
},
242
- expectError : "code=401 , message=missing or malformed jwt, internal=missing value in cookies" ,
242
+ expectError : "code=400 , message=missing or malformed jwt, internal=missing value in cookies" ,
243
243
},
244
244
{
245
245
name : "Valid form method" ,
@@ -264,7 +264,7 @@ func TestJWT_combinations(t *testing.T) {
264
264
SigningKey : validKey ,
265
265
TokenLookup : "form:jwt" ,
266
266
},
267
- expectError : "code=401 , message=missing or malformed jwt, internal=missing value in the form" ,
267
+ expectError : "code=400 , message=missing or malformed jwt, internal=missing value in the form" ,
268
268
},
269
269
}
270
270
0 commit comments