lua-resty-openidc
lua-resty-openidc copied to clipboard
Correlation IDs in introspect flow
Hello,
Is it possible to configure the OIDC library to allow forwarding a correlation ID to the OIDC provider from Kong (from the incoming request) in the introspect flow?
That way, if there is a failure in the introspection, internal engineers can use the correlation ID to track where the request failed, and why.
Yes, you can use http_request_decorator for that. In fact this is exactly the use case I wanted this to be added in the past, see #199
Something like
http_request_decorator = function(req)
local h = req.headers or {}
h['correlation-id'] = 'my correlation id'
req.headers = h
return req
end
should do.