/modules/apps/foundation/portal-settings/portal-settings-authentication-facebook-connect-web/src/main/resources/META-INF/resources/com.liferay.portal.settings.web/facebook.jsp

http://github.com/liferay/liferay-portal · JavaServer Pages · 61 lines · 32 code · 16 blank · 13 comment · 1 complexity · 42024a6bf87283113e6cfe004285eef8 MD5 · raw file

  1. <%--
  2. /**
  3. * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
  4. *
  5. * This library is free software; you can redistribute it and/or modify it under
  6. * the terms of the GNU Lesser General Public License as published by the Free
  7. * Software Foundation; either version 2.1 of the License, or (at your option)
  8. * any later version.
  9. *
  10. * This library is distributed in the hope that it will be useful, but WITHOUT
  11. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  12. * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
  13. * details.
  14. */
  15. --%>
  16. <%@ include file="/com.liferay.portal.settings.web/init.jsp" %>
  17. <%
  18. FacebookConnectConfiguration facebookConnectConfiguration = ConfigurationProviderUtil.getConfiguration(FacebookConnectConfiguration.class, new ParameterMapSettingsLocator(request.getParameterMap(), "facebook--", new CompanyServiceSettingsLocator(company.getCompanyId(), FacebookConnectConstants.SERVICE_NAME)));
  19. boolean authEnabled = facebookConnectConfiguration.enabled();
  20. boolean verifiedAccountRequired = facebookConnectConfiguration.verifiedAccountRequired();
  21. String appId = facebookConnectConfiguration.appId();
  22. String appSecret = facebookConnectConfiguration.appSecret();
  23. if (Validator.isNotNull(appSecret)) {
  24. appSecret = Portal.TEMP_OBFUSCATION_VALUE;
  25. }
  26. String graphURL = facebookConnectConfiguration.graphURL();
  27. String oauthAuthURL = facebookConnectConfiguration.oauthAuthURL();
  28. String oauthTokenURL = facebookConnectConfiguration.oauthTokenURL();
  29. String oauthRedirectURL = facebookConnectConfiguration.oauthRedirectURL();
  30. %>
  31. <liferay-ui:error key="facebookConnectGraphURLInvalid" message="the-facebook-connect-graph-url-is-invalid" />
  32. <liferay-ui:error key="facebookConnectOauthAuthURLInvalid" message="the-facebook-connect-oauth-auth-url-is-invalid" />
  33. <liferay-ui:error key="facebookConnectOauthRedirectURLInvalid" message="the-facebook-connect-oauth-redirect-url-is-invalid" />
  34. <liferay-ui:error key="facebookConnectOauthTokenURLInvalid" message="the-facebook-connect-oauth-token-url-is-invalid" />
  35. <aui:fieldset>
  36. <aui:input name="<%= ActionRequest.ACTION_NAME %>" type="hidden" value="/portal_settings/facebook_connect" />
  37. <aui:input label="enabled" name="facebook--enabled" type="checkbox" value="<%= authEnabled %>" />
  38. <aui:input label="require-verified-account" name="facebook--verifiedAccountRequired" type="checkbox" value="<%= verifiedAccountRequired %>" />
  39. <aui:input cssClass="lfr-input-text-container" label="application-id" name="facebook--appId" type="text" value="<%= appId %>" />
  40. <aui:input cssClass="lfr-input-text-container" label="application-secret" name="facebook--appSecret" type="password" value="<%= appSecret %>" />
  41. <aui:input cssClass="lfr-input-text-container" label="graph-url" name="facebook--graphURL" type="text" value="<%= graphURL %>" />
  42. <aui:input cssClass="lfr-input-text-container" label="oauth-authentication-url" name="facebook--oauthAuthURL" type="text" value="<%= oauthAuthURL %>" />
  43. <aui:input cssClass="lfr-input-text-container" label="oauth-token-url" name="facebook--oauthTokenURL" type="text" value="<%= oauthTokenURL %>" />
  44. <aui:input cssClass="lfr-input-text-container" label="oauth-redirect-url" name="facebook--oauthRedirectURL" type="text" value="<%= oauthRedirectURL %>" />
  45. </aui:fieldset>