通过常见挑战身份验证方案确定API的体系结构
我们正在为集成目的创建向多个客户端的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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论