简体   繁体   中英

Facebook SSO to individual portlets in Liferay

I have a requirement in Liferay to do Facebook SSO to all my portlets (eg: Socialcom) after a successful login.

The Socialcom portlet will display the contents of socialcom website (as of now)

Steps

  • User logs in to portal using his facebook credentials
  • Portal displays Socialcom portlet & some other portlets (supporting Facebook SSO in their website)
  • Each portlet should get authenticated automatically via the facebook SSO.

I have enabled facebook authentication for liferay which works fine.

Any help for doing SSO for individual portlets will be appreciated.

Thanks,

Siby

I assume that you want your portlets to use the facebook API to get more information or to trigger action/activity?

While I don't have too much experience with this, keep in mind that this is a different usecase: In SSO we only want to have the user's identity. As Liferay is not doing anything in addition with this information, I expect that there's no more information that you'll find here. The portal's job is to let you know who is currently logged in. You typically don't worry about the login process - eg if they're signed in through Facebook, OpenId, locally or through any other means. Then their account can have the relevant facebook identity, but you don't want the portal to keep the permission to make arbitrary calls to Facebook: After all, there can be other portlets that are deployed, that also make use of this connection.

I'm assuming (hoping it is this way) that you'll have to get the credentials and permissions for Facebook-calls yourself and share them with all portlets that make up your own application.

If my expectation is not met, I'd expect this to be a quite big security issue: Just because you want your portlets to be able to call into facebook, you don't want mine to be automatically authenticated as well. Trust me, you don't ;)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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