[英]Node-oidc-provider How to store clients in database
I have a problem with node-oidc-provider.我对 node-oidc-provider 有疑问。
I want the client list to be stored in the database, but I haven't found a solution.我希望将客户列表存储在数据库中,但我还没有找到解决方案。
Please help me!!!请帮我!!!
For storing clients in the database, Dynamic Client Registration has to be enabled.为了在数据库中存储客户端,必须启用动态客户端注册。 After enabling this, you can make use of below link to store the clients as well as other tokens
启用此功能后,您可以使用以下链接来存储客户端以及其他令牌
https://github.com/panva/node-oidc-provider/blob/main/example/adapters/contributed/sequelize.js https://github.com/panva/node-oidc-provider/blob/main/example/adapters/contributed/sequelize.js
For creating tables, you can use below link要创建表格,您可以使用以下链接
https://github.com/roggervalf/node-oidc-provider/tree/examples/example/migrations/sequelize https://github.com/roggervalf/node-oidc-provider/tree/examples/example/migrations/sequelize
You can have your client definitions stored in a DB, just have your adapter for the Client model respond to the find(id)
invocation.您可以将客户端定义存储在数据库中,只需让客户端 model 的适配器响应
find(id)
调用。
https://github.com/panva/node-oidc-provider/blob/main/docs/README.md#clients https://github.com/panva/node-oidc-provider/blob/main/docs/README.md#clients
In addition to these clients the provider will use your adapter's find method when a non-static client_id is encountered.
除了这些客户端之外,当遇到非静态 client_id 时,提供者还将使用您的适配器的 find 方法。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.