I am using npm package panva's oidc-provider to implement features of OIDC for login.
I want to override a few well known configurations of OIDC provider.
Well known configuration url:
<EXTERNAL DNS OF AUTH SERVER>/.well-known/openid-configuration
For example: I want to override the <EXTERNAL DNS OF AUTH SERVER>/token
end point to <INTERNAL DNS OF AUTH SERVER>/token
Is any such feature given by the library?
Can anyone help me please?
We can use middlewares. You control the complete response in the post-middleware, so change it to whatever you need, whenever you need.
https://github.com/panva/node-oidc-provider/blob/main/docs/README.md#pre--and-post-middlewares
If you need to customize the node-oidc-provider.well-known configuration url, the best way is:
/** Hold all the OIDC Provider configurations */
module.exports = {
/** https://github.com/panva/node-oidc-provider/tree/main/docs#discovery */
discovery: discovery,
/** @See https://github.com/panva/node-oidc-provider/tree/main/docs#findaccount */
findAccount: Account.findAccount,
/** @See https://github.com/panva/node-oidc-provider/tree/main/docs#clients */
clients: clients,
// Others configurations
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.