@@ -156,14 +156,14 @@ func TestJWT_combinations(t *testing.T) {
156156 config : Config {
157157 SigningKey : validKey ,
158158 },
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" ,
160160 },
161161 {
162162 name : "Empty header auth field" ,
163163 config : Config {
164164 SigningKey : validKey ,
165165 },
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" ,
167167 },
168168 {
169169 name : "Valid query method" ,
@@ -180,7 +180,7 @@ func TestJWT_combinations(t *testing.T) {
180180 TokenLookup : "query:jwt" ,
181181 },
182182 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" ,
184184 },
185185 {
186186 name : "Invalid query param value" ,
@@ -198,7 +198,7 @@ func TestJWT_combinations(t *testing.T) {
198198 TokenLookup : "query:jwt" ,
199199 },
200200 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" ,
202202 },
203203 {
204204 config : Config {
@@ -239,7 +239,7 @@ func TestJWT_combinations(t *testing.T) {
239239 SigningKey : validKey ,
240240 TokenLookup : "cookie:jwt" ,
241241 },
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" ,
243243 },
244244 {
245245 name : "Valid form method" ,
@@ -264,7 +264,7 @@ func TestJWT_combinations(t *testing.T) {
264264 SigningKey : validKey ,
265265 TokenLookup : "form:jwt" ,
266266 },
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" ,
268268 },
269269 }
270270
0 commit comments