通过常见挑战身份验证方案确定API的体系结构

发布于 2025-02-10 01:01:29 字数 300 浏览 1 评论 0原文

我们正在为集成目的创建向多个客户端的API。主要思想是挑战方案应相同,以进行身份​​验证和发出令牌和重定向URL。

我想两个选项

选项1:基于插件的体系结构:创建一个将加载特定插件的单个API。每个客户端的需求都在类库中实现,并根据请求加载所需的插件。就像客户端A的请求一样。客户端一个要加载的插件,然后将处理该请求。

选项2:每个客户端的单独API:在单独的API中实现了每个客户端的要求。身份验证方案是相同的,可以将其重定向到该URL。

什么是最好的方法?

We are creating an exposing Apis to multiple clients for integration purposes. The main idea is the challenge scheme should be same to authenticate and issue token and a redirect Url.

I am thinking of two options

Option 1: Plugin based architecture: Create a single api that will load specific plugins. Each client requirement is implemented in class library and load the desired plugin based on request. Like a request is made by client A. client A plugin to be loaded and then this will handle the request.

Option 2: Separate Api for each client: Each client requirement is implemented in a separate Api. The authentication scheme is same to provide and redirect to this url.

What is best way to handle this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文