Fórum
Authentication with widgets
Vipin Bardia, modificado 8 Anos atrás.
Authentication with widgets
Regular Member Postagens: 162 Data de Entrada: 28/02/11 Postagens Recentes
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?
Andrew Jardine, modificado 8 Anos atrás.
RE: Authentication with widgets
Liferay Legend Postagens: 2416 Data de Entrada: 22/12/10 Postagens Recentes
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?
Vipin Bardia, modificado 8 Anos atrás.
RE: Authentication with widgets
Regular Member Postagens: 162 Data de Entrada: 28/02/11 Postagens Recentes
Hi Andrew,
No I didn't try that. Will try and update.
Thanks.
No I didn't try that. Will try and update.
Thanks.
Corné Aussems, modificado 8 Anos atrás.
RE: Authentication with widgets
Liferay Legend Postagens: 1313 Data de Entrada: 03/10/06 Postagens RecentesVipin 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é
Corné Aussems, modificado 8 Anos atrás.
RE: Authentication with widgets
Liferay Legend Postagens: 1313 Data de Entrada: 03/10/06 Postagens Recentes
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
Vipin Bardia, modificado 8 Anos atrás.
RE: Authentication with widgets
Regular Member Postagens: 162 Data de Entrada: 28/02/11 Postagens Recentes
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.
Sushil Patidar, modificado 8 Anos atrás.
RE: Authentication with widgets
Expert Postagens: 467 Data de Entrada: 31/10/11 Postagens Recentes
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