Summary
I'd like to be able to customise the resulting JSON given by /.well-known/openid-configuration.
Desired solution
Something slimilar to the existing Events
server.service.once(Events.BeforeWellKnownDocument, callback)
As long as the callback as access to the document, and is able to either replace it or mutate it, I'm happy.
Alternative solutions
I've tried adding a route with /.well-known/openid-configuration while configuring the server to have a different wellKnownDocument endpoint.
Additional Context
My usecase is running oauth2-mock-server in a container with oauth2-proxy so we have automatic redirect to the url defined by authorization_endpoint as defined in /.well-known/openid-configuration.
In this case, I'd like that to be a link to localhost rather than the issuer URL.
Summary
I'd like to be able to customise the resulting JSON given by
/.well-known/openid-configuration.Desired solution
Something slimilar to the existing
EventsAs long as the callback as access to the document, and is able to either replace it or mutate it, I'm happy.
Alternative solutions
I've tried adding a route with
/.well-known/openid-configurationwhile configuring the server to have a differentwellKnownDocumentendpoint.Additional Context
My usecase is running
oauth2-mock-serverin a container withoauth2-proxyso we have automatic redirect to the url defined byauthorization_endpointas defined in/.well-known/openid-configuration.In this case, I'd like that to be a link to
localhostrather than the issuer URL.