@@ -73,7 +73,7 @@ test("POST '/api/v1/issue-token' issues token with default values", async (t) =>
7373 scope : "https://example.com" ,
7474 } ,
7575 headers : {
76- Authentication : `Bearer ${ TEST_ISSUER_TOKEN } ` ,
76+ Authorization : `Bearer ${ TEST_ISSUER_TOKEN } ` ,
7777 } ,
7878 } ) ;
7979
@@ -105,7 +105,7 @@ test("POST '/api/v1/issue-token' issues token with custom validity", async (t) =
105105 validity : 3600 ,
106106 } ,
107107 headers : {
108- Authentication : `Bearer ${ TEST_ISSUER_TOKEN } ` ,
108+ Authorization : `Bearer ${ TEST_ISSUER_TOKEN } ` ,
109109 } ,
110110 } ) ;
111111
@@ -137,7 +137,7 @@ test("POST '/api/v1/issue-token' issues token with strict attribute", async (t)
137137 strict : true ,
138138 } ,
139139 headers : {
140- Authentication : `Bearer ${ TEST_ISSUER_TOKEN } ` ,
140+ Authorization : `Bearer ${ TEST_ISSUER_TOKEN } ` ,
141141 } ,
142142 } ) ;
143143
@@ -155,7 +155,7 @@ test("POST '/api/v1/issue-token' issues token with strict attribute", async (t)
155155 t . assert ( payload . iat ! >= stamp ) ;
156156} ) ;
157157
158- test ( "POST '/api/v1/issue-token' rejects requests without authentication " , async ( t ) => {
158+ test ( "POST '/api/v1/issue-token' rejects requests without authorization " , async ( t ) => {
159159 const { app } = t . context ;
160160
161161 const response = await app . inject ( {
@@ -171,11 +171,11 @@ test("POST '/api/v1/issue-token' rejects requests without authentication", async
171171 t . deepEqual ( body , {
172172 statusCode : 400 ,
173173 error : "Bad Request" ,
174- message : "headers must have required property 'authentication '" ,
174+ message : "headers must have required property 'authorization '" ,
175175 } ) ;
176176} ) ;
177177
178- test ( "POST '/api/v1/issue-token' rejects requests with invalid authentication " , async ( t ) => {
178+ test ( "POST '/api/v1/issue-token' rejects requests with invalid authorization " , async ( t ) => {
179179 const { app } = t . context ;
180180
181181 const response = await app . inject ( {
@@ -186,7 +186,7 @@ test("POST '/api/v1/issue-token' rejects requests with invalid authentication",
186186 } ,
187187 headers : {
188188 // correctly signed visit token - but not an issuer token
189- Authentication : `Bearer ${ TEST_TOKEN } ` ,
189+ Authorization : `Bearer ${ TEST_TOKEN } ` ,
190190 } ,
191191 } ) ;
192192
0 commit comments