掲示板
Authentication with widgets
8年前 に Vipin Bardia によって更新されました。
Authentication with widgets
Regular Member 投稿: 162 参加年月日: 11/02/28 最新の投稿
Hi Folks,
I am trying to use liferay widgets into salesforce and want to display authenticated user's data.
I am using below JS to embed widgets in my another site -
How can I authenticate users in case of widgets?
I am trying to use liferay widgets into salesforce and want to display authenticated user's data.
I am using below JS to embed widgets in my another site -
<script src="https://abc.com/html/js/liferay/widget.js" type="text/javascript"></script>
<script type="text/javascript">
Liferay.Widget({ url: 'https://abc.com/widget/web/lr/home/-/hello_INSTANCE_RIZ2TlJMaoM9'});
</script>
How can I authenticate users in case of widgets?
8年前 に Andrew Jardine によって更新されました。
RE: Authentication with widgets
Liferay Legend 投稿: 2416 参加年月日: 10/12/22 最新の投稿
Hi Vipin,
I've never done this before but have you tried passing the credentials in the url? Even if just to see whether or not that actually works?
I've never done this before but have you tried passing the credentials in the url? Even if just to see whether or not that actually works?
8年前 に Vipin Bardia によって更新されました。
RE: Authentication with widgets
Regular Member 投稿: 162 参加年月日: 11/02/28 最新の投稿
Hi Andrew,
No I didn't try that. Will try and update.
Thanks.
No I didn't try that. Will try and update.
Thanks.
8年前 に Corné Aussems によって更新されました。
RE: Authentication with widgets
Liferay Legend 投稿: 1313 参加年月日: 06/10/03 最新の投稿Vipin Bardia:
How can I authenticate users in case of widgets?
Hi Vipin,
Basically you have to be logged in to the Liferay Instance that you receive the Widget from.
Place your widget on a private page or site and you are automatically send to login screen:
Its simply proven: if you are logged in to this Liferay Instance with the same browser before calling the widget url you should be logged in as wel in the widget ( it shares the same cookie/session.
So its all about how do you want to be known in a Widget, as a know user or as a generic user.
Do you want Widget Users first to login to Liferay or do you want them to be auto logged in as some generic user: Any of the auto login hooks should be able to help you in last case.
auto.login.hooks=com.liferay.portal.security.auth.CASAutoLogin,com.liferay.portal.security.auth.FacebookAutoLogin,com.liferay.portal.security.auth.NtlmAutoLogin,com.liferay.portal.security.auth.OpenIdAutoLogin,com.liferay.portal.security.auth.OpenSSOAutoLogin,com.liferay.portal.security.auth.RememberMeAutoLogin,com.liferay.portal.security.auth.SiteMinderAutoLogin
More complex and best with Salesforce would be to use SAML authentication.
Good luck.
Corné
8年前 に Corné Aussems によって更新されました。
RE: Authentication with widgets
Liferay Legend 投稿: 1313 参加年月日: 06/10/03 最新の投稿
BTW please ask questions in the appropriate category for instance
Using Liferay » General
This one is about Marketplace issues
Using Liferay » General
This one is about Marketplace issues
8年前 に Vipin Bardia によって更新されました。
RE: Authentication with widgets
Regular Member 投稿: 162 参加年月日: 11/02/28 最新の投稿
Hi Corné,
Thanks for your inputs.
Will try to go with SSO.
Apologies for using the wrong category. I did it by mistake. Will take care of that in future.
Thanks for your inputs.
Will try to go with SSO.
Apologies for using the wrong category. I did it by mistake. Will take care of that in future.
8年前 に Sushil Patidar によって更新されました。
RE: Authentication with widgets
Expert 投稿: 467 参加年月日: 11/10/31 最新の投稿
Hi,
If i got your requirement correctly. You can use OAuth for authentication.Following link may be help full for you.
https://dev.liferay.com/discover/portal/-/knowledge_base/6-1/exporting-portal-applications-as-widgets-and-opensocial-gadgets
https://www.liferay.com/marketplace/-/mp/application/45261909
https://dev.liferay.com/discover/portal/-/knowledge_base/6-2/oauth
Regards
If i got your requirement correctly. You can use OAuth for authentication.Following link may be help full for you.
https://dev.liferay.com/discover/portal/-/knowledge_base/6-1/exporting-portal-applications-as-widgets-and-opensocial-gadgets
https://www.liferay.com/marketplace/-/mp/application/45261909
https://dev.liferay.com/discover/portal/-/knowledge_base/6-2/oauth
Regards