简体   繁体   English

如何在IBM Bluemix中对移动云应用程序进行授权

[英]How to do authorization for mobile cloud app in IBM Bluemix

There are multiple tutorials about authentication in Bluemix, but I yet to find a good tutorial about authorization. Bluemix中有许多关于认证的教程,但是我还没有找到关于授权的很好的教程。 In my mobile app, I need to group users and only users with a group get to see the messages allowed to this group. 在我的移动应用程序中,我需要对用户进行分组,只有具有分组的用户才能查看允许该组的消息。 Is there a service can help to implement this? 有服务可以帮助实现这一点吗?

Someone mentioned Stormpath in the forum, it has built in features for user registry, login, authorization etc, which is what I need. 有人在论坛中提到Stormpath,它具有用于用户注册表,登录,授权等的内置功能,这正是我所需要的。 Does it work with mobile app? 它可以与移动应用程序一起使用吗? is it free to use with Bluemix? 它可以免费与Bluemix一起使用吗? It has tutorial to integrate with node.js, assume that works with Bluemix? 它具有与node.js集成的教程,假设它可以与Bluemix一起使用?

Thanks. 谢谢。

Zheng

Use Bluemix Push Notifications service. 使用Bluemix推送通知服务。 This service manages the mapping of your application users to their devices, device platform, and handles dispatching push notifications to them. 此服务管理您的应用程序用户到他们的设备,设备平台的映射,并处理向他们分发推送通知。 With this service, you can send broadcasts, unicasts (based on userID, deviceID), and also tags (or topics) based on push notifications to your mobile application users. 使用此服务,您可以向移动应用程序用户发送广播,单播(基于userID,deviceID)以及基于推送通知的标签(或主题)。

Stormpath is not an IBM product and comes with its own pricing (read: not free). Stormpath不是IBM产品,并具有其自己的价格(阅读:不是免费的)。 And yes the node.js tutorial would work. 是的,node.js教程可以使用。

You could use the business rules service in Bluemix to determine authorisation. 您可以使用Bluemix中的业务规则服务来确定授权。 While it is more effort (you still need to query a store where groups and roles are kept, eg LDAP) it allows most flexibility. 尽管这比较费力(您仍然需要查询保留了组和角色的商店,例如LDAP),但它具有最大的灵活性。 Instead of asking "is the user member of group xxx" you ask "is this user authorized" and let the business rule figure that out. 而不是询问“是该组xxx的用户成员”,而是询问“此用户是否被授权”,并让业务规则找出答案。

The Stormpath API has been deprecated, so if you are using it you'll need to migrate by August 17th 2017 . Stormpath API已弃用,因此,如果要使用它,则需要在2017年8月17日之前进行迁移。

There are currently a few options in the Bluemix catalog. 当前,Bluemix目录中有一些选项。

Passport is a third party option that is similar to Stormpath but also has some additional user management features. Passport是类似于Stormpath的第三方选项,但还具有一些其他用户管理功能。 IBM is offering App ID , but I believe this is only offering social authentication and then service authorization. IBM提供了App ID ,但是我相信这只是提供社会认证,然后提供服务授权。 If you don't want social login, you'd have to bring your own Identity Provider. 如果您不想进行社交登录,则必须携带自己的身份提供商。

I am not aware of any free offerings in the Bluemix catalog. 我不知道Bluemix目录中有任何免费产品。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM