简体   繁体   English

Node-oidc-provider 如何将客户端存储在数据库中

[英]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.

相关问题 node-oidc-provider 的路由问题 - problem with routes with node-oidc-provider [node oidc provider]:授权代码流程 - [node oidc provider]: Authorization code flow 如何将 librdkafka 与 OIDC 和 Azure AD 一起用作 OAUTHBEARER 的令牌提供者? - How to use librdkafka with OIDC and Azure AD as token provider for OAUTHBEARER? 适用于无浏览器客户端的 OIDC - OIDC for browser-less clients 如何配置 Spring Boot 以使用 AWS Cognito (OAuth2/OIDC) 对 Web 应用程序用户和 REST 客户端进行身份验证 - How to configure Spring Boot to authenticate Web-app users and REST clients using AWS Cognito (OAuth2/OIDC) OIDC 访问令牌 - 在哪里存储? - OIDC Access Token - Where to store? 在 AWS 中为 OIDC 提供商的角色添加策略时出错 - error adding policy for a role for OIDC provider in AWS 使Swagger UI oauth2与oidc-provider一起使用 - Getting Swagger UI oauth2 work with oidc-provider oidc-provider 访问 UserInfo enpoint 时提供的令牌无效 - Invalid token provided in oidc-provider accessing UserInfo enpoint OAuth2提供者:如何提供登录页面以便让oauth客户端获取资源所有者ID - OAuth2 Provider: How to offer a login page in order to let oauth clients get the resource owner id
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM