@@ -7,7 +7,6 @@ local clientCert = assert(fixture('CA', 'client.crt'))
77local header_parameter = ' x5t#S256'
88
99local function jwt_cnf ()
10- local cnf = b64 .encode_base64url (X509 .new (clientCert ):digest (' SHA256' ))
1110 return { [header_parameter ] = b64 .encode_base64url (X509 .new (clientCert ):digest (' SHA256' )) }
1211end
1312
@@ -36,31 +35,31 @@ describe('fapi_1_baseline_profile policy', function()
3635
3736 describe (' .header_filter' , function ()
3837 it (' Use value from request' , function ()
39- ngx_req_headers [' x-fapi-transaction -id' ] = ' abc'
38+ ngx_req_headers [' x-fapi-interaction -id' ] = ' abc'
4039 local fapi_policy = FAPIPolicy .new ({})
4140 fapi_policy :header_filter ()
42- assert .same (' abc' , ngx .header [' x-fapi-transaction -id' ])
41+ assert .same (' abc' , ngx .header [' x-fapi-interaction -id' ])
4342 end )
4443
45- it (' Only use x-fapi-transaction -id from request if the header also exist in response from upstream' , function ()
46- ngx_req_headers [' x-fapi-transaction -id' ] = ' abc'
47- ngx_resp_headers [' x-fapi-transaction -id' ] = ' bdf'
44+ it (' Only use x-fapi-interaction -id from request if the header also exist in response from upstream' , function ()
45+ ngx_req_headers [' x-fapi-interaction -id' ] = ' abc'
46+ ngx_resp_headers [' x-fapi-interaction -id' ] = ' bdf'
4847 local fapi_policy = FAPIPolicy .new ({})
4948 fapi_policy :header_filter ()
50- assert .same (' abc' , ngx .header [' x-fapi-transaction -id' ])
49+ assert .same (' abc' , ngx .header [' x-fapi-interaction -id' ])
5150 end )
5251
53- it (' Use x-fapi-transaction -id from upstream response' , function ()
54- ngx_resp_headers [' x-fapi-transaction -id' ] = ' abc'
52+ it (' Use x-fapi-interaction -id from upstream response' , function ()
53+ ngx_resp_headers [' x-fapi-interaction -id' ] = ' abc'
5554 local fapi_policy = FAPIPolicy .new ({})
5655 fapi_policy :header_filter ()
57- assert .same (' abc' , ngx .header [' x-fapi-transaction -id' ])
56+ assert .same (' abc' , ngx .header [' x-fapi-interaction -id' ])
5857 end )
5958
6059 it (' generate uuid if header does not exist in both request and response' , function ()
6160 local fapi_policy = FAPIPolicy .new ({})
6261 fapi_policy :header_filter ()
63- assert .is_true (uuid .is_valid (ngx .header [' x-fapi-transaction -id' ]))
62+ assert .is_true (uuid .is_valid (ngx .header [' x-fapi-interaction -id' ]))
6463 end )
6564 end )
6665
0 commit comments