如何在REST API中将移动应用程序用户和Web应用程序用户分开?
有不同的用户,例如教练,运动员,见面主任和管理员。教练&运动员是移动应用程序用户,管理员是Web应用程序用户,Meet Director既是移动设备& Web应用程序用户。 请建议任何宝石或分享您的想法。
There are different user like Coach, Athlete, Meet Director and Admin. Coach & Athlete are mobile app users, Admin are Web app user, Meet Director are both mobile & web app user.
Please suggest any gem or share your thoughts.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这个问题非常广泛,我将做出建议以提出建议:
,我建议您根据角色分配使用检查点的服务。
我在下面建议的方法非常幼稚,但是好像您作为“工厂”的入口点,根据用户的角色产生回应...
我会说一件事可能在将来证明有价值的一件事是允许用户具有多个角色。如果这很有意义,那将使用户允许教练和运动员进入。
例如:
但是,让我添加一种方法的建议
This question is very broad, and I will make sume assumptions in order to make a suggestion:
Based on this, I would suggest you to assign your service with checkpoints based on the role.
The approach I suggest below is quite naive, but works as if your entry point as a 'factory', producing the response based on the users's role...
I would say one thing that might prove valuable in the future is to allow an user to have multiple roles. That would grant the user both coach and athlete access, for exemple, if that makes sense.
Ex:
but let me add a suggestion of approach to take