mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-24 18:25:04 +08:00
Fix the error thrown on enabling the "OpenId.Google" feature (#7556)
This commit is contained in:
committed by
Sébastien Ros
parent
8002d34d65
commit
324261ba80
@@ -1,7 +1,7 @@
|
||||
namespace Orchard.OpenId.Constants {
|
||||
public class General {
|
||||
public const string AuthenticationErrorUrl = "~/Authentication/Error";
|
||||
public const string LogonCallbackUrl = "~/Users/Account/LogonCallback";
|
||||
public const string LogonCallbackUrl = "/Users/Account/LogonCallback";
|
||||
public const string OpenIdOwinMiddlewarePriority = "10";
|
||||
public const string LocalIssuer = "LOCAL AUTHORITY";
|
||||
public const string FormsIssuer = "Forms";
|
||||
|
||||
@@ -6,6 +6,7 @@ using System.Web.Mvc;
|
||||
using Microsoft.Owin.Security;
|
||||
using Microsoft.Owin.Security.Cookies;
|
||||
using Microsoft.Owin.Security.OpenIdConnect;
|
||||
using Orchard.Environment.Configuration;
|
||||
using Orchard.Environment.Extensions;
|
||||
using Orchard.Localization;
|
||||
using Orchard.Logging;
|
||||
@@ -99,7 +100,7 @@ namespace Orchard.OpenId.Controllers
|
||||
TempData["ReturnUrl"] = returnUrl;
|
||||
}
|
||||
|
||||
var redirectUri = Url.Content(String.Concat(Constants.General.LogonCallbackUrl));
|
||||
var redirectUri = Url.Content(GetCallbackPath(_orchardServices.WorkContext));
|
||||
|
||||
HttpContext.GetOwinContext().Authentication.Challenge(new AuthenticationProperties { RedirectUri = redirectUri }, openIdProvider);
|
||||
}
|
||||
@@ -168,5 +169,17 @@ namespace Orchard.OpenId.Controllers
|
||||
|
||||
return user;
|
||||
}
|
||||
|
||||
private string GetCallbackPath(WorkContext workContext)
|
||||
{
|
||||
var shellSettings = workContext.Resolve<ShellSettings>();
|
||||
var tenantPrefix = shellSettings.RequestUrlPrefix;
|
||||
|
||||
var callbackUrl = string.IsNullOrWhiteSpace(tenantPrefix) ?
|
||||
Constants.General.LogonCallbackUrl :
|
||||
string.Format("/{0}{1}", tenantPrefix, Constants.General.LogonCallbackUrl);
|
||||
|
||||
return callbackUrl;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -21,8 +21,7 @@ namespace Orchard.OpenId.Models {
|
||||
set { this.Store(x => x.PostLogoutRedirectUri, value); }
|
||||
}
|
||||
|
||||
public bool IsValid {
|
||||
get {
|
||||
public bool IsValid() {
|
||||
if (String.IsNullOrWhiteSpace(ClientId) ||
|
||||
String.CompareOrdinal(ClientId, Constants.ActiveDirectoryFederationServices.DefaultClientId) == 0 ||
|
||||
String.IsNullOrWhiteSpace(MetadataAddress) ||
|
||||
@@ -36,4 +35,3 @@ namespace Orchard.OpenId.Models {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -71,14 +71,12 @@ namespace Orchard.OpenId.Models {
|
||||
set { this.Store(x => x.AppKey, value); }
|
||||
}
|
||||
|
||||
public string GraphApiKey
|
||||
{
|
||||
public string GraphApiKey {
|
||||
get { return this.Retrieve(x => x.GraphApiKey); }
|
||||
set { this.Store(x => x.GraphApiKey, value); }
|
||||
}
|
||||
|
||||
public bool IsValid {
|
||||
get {
|
||||
public bool IsValid() {
|
||||
if (String.IsNullOrWhiteSpace(Tenant) ||
|
||||
String.IsNullOrWhiteSpace(ClientId) ||
|
||||
String.IsNullOrWhiteSpace(LogoutRedirectUri) ||
|
||||
@@ -90,7 +88,6 @@ namespace Orchard.OpenId.Models {
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public Dictionary<string, string> ServiceResourceIDs {
|
||||
get {
|
||||
|
||||
@@ -16,8 +16,7 @@ namespace Orchard.OpenId.Models {
|
||||
set { this.Store(x => x.AppSecret, value); }
|
||||
}
|
||||
|
||||
public bool IsValid {
|
||||
get {
|
||||
public bool IsValid() {
|
||||
if (String.IsNullOrWhiteSpace(AppId) ||
|
||||
String.CompareOrdinal(AppId, Constants.Facebook.DefaultAppId) == 0 ||
|
||||
String.IsNullOrWhiteSpace(AppSecret) ||
|
||||
@@ -30,4 +29,3 @@ namespace Orchard.OpenId.Models {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,10 @@
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.Environment.Extensions;
|
||||
|
||||
namespace Orchard.OpenId.Models {
|
||||
namespace Orchard.OpenId.Models
|
||||
{
|
||||
[OrchardFeature("Orchard.OpenId.Google")]
|
||||
public class GoogleSettingsPart : ContentPart {
|
||||
|
||||
@@ -16,18 +18,20 @@ namespace Orchard.OpenId.Models {
|
||||
set { this.Store(x => x.ClientSecret, value); }
|
||||
}
|
||||
|
||||
[RegularExpression(pattern: "/.+", ErrorMessage = "The Callback Path Must start with a forward slash '/' followed by one or more characters")]
|
||||
public string CallbackPath {
|
||||
get { return this.Retrieve(x => x.CallbackPath, () => Constants.General.LogonCallbackUrl); }
|
||||
set { this.Store(x => x.CallbackPath, value); }
|
||||
}
|
||||
|
||||
public bool IsValid {
|
||||
get {
|
||||
public bool IsValid() {
|
||||
if (String.IsNullOrWhiteSpace(ClientId) ||
|
||||
String.CompareOrdinal(ClientId, Constants.Google.DefaultClientId) == 0 ||
|
||||
String.IsNullOrWhiteSpace(ClientSecret) ||
|
||||
String.CompareOrdinal(ClientId, Constants.Google.DefaultClientSecret) == 0 ||
|
||||
String.IsNullOrWhiteSpace(CallbackPath)) {
|
||||
String.IsNullOrWhiteSpace(CallbackPath) ||
|
||||
CallbackPath.StartsWith("/") == false ||
|
||||
CallbackPath.Length < 2) {
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -36,4 +40,3 @@ namespace Orchard.OpenId.Models {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -16,8 +16,7 @@ namespace Orchard.OpenId.Models {
|
||||
set { this.Store(x => x.ConsumerSecret, value); }
|
||||
}
|
||||
|
||||
public bool IsValid {
|
||||
get {
|
||||
public bool IsValid() {
|
||||
if (String.IsNullOrWhiteSpace(ConsumerKey) ||
|
||||
String.CompareOrdinal(ConsumerKey, Constants.Twitter.DefaultConsumerKey) == 0 ||
|
||||
String.IsNullOrWhiteSpace(ConsumerSecret) ||
|
||||
@@ -28,7 +27,6 @@ namespace Orchard.OpenId.Models {
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public string VeriSignClass3SecureServerCA_G2
|
||||
{
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace Orchard.OpenId.OwinMiddlewares {
|
||||
public IEnumerable<OwinMiddlewareRegistration> GetOwinMiddlewares() {
|
||||
var settings = _workContextAccessor.GetContext().CurrentSite.As<ActiveDirectoryFederationServicesSettingsPart>();
|
||||
|
||||
if (settings == null || !settings.IsValid) {
|
||||
if (settings == null || !settings.IsValid()) {
|
||||
return Enumerable.Empty<OwinMiddlewareRegistration>();
|
||||
}
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ namespace Orchard.OpenId.OwinMiddlewares {
|
||||
var azureWebSiteProtectionEnabled = false;
|
||||
var azureUseAzureGraphApi = false;
|
||||
|
||||
if (settings == null || !settings.IsValid) {
|
||||
if (settings == null || !settings.IsValid()) {
|
||||
return Enumerable.Empty<OwinMiddlewareRegistration>();
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace Orchard.OpenId.OwinMiddlewares {
|
||||
public IEnumerable<OwinMiddlewareRegistration> GetOwinMiddlewares() {
|
||||
var settings = _workContextAccessor.GetContext().CurrentSite.As<FacebookSettingsPart>();
|
||||
|
||||
if (settings == null || !settings.IsValid) {
|
||||
if (settings == null || !settings.IsValid()) {
|
||||
return Enumerable.Empty<OwinMiddlewareRegistration>();
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ using System.Linq;
|
||||
using Microsoft.Owin;
|
||||
using Microsoft.Owin.Security.Google;
|
||||
using Orchard.ContentManagement;
|
||||
using Orchard.Environment.Configuration;
|
||||
using Orchard.Environment.Extensions;
|
||||
using Orchard.OpenId.Models;
|
||||
using Orchard.Owin;
|
||||
@@ -18,16 +19,17 @@ namespace Orchard.OpenId.OwinMiddlewares {
|
||||
}
|
||||
|
||||
public IEnumerable<OwinMiddlewareRegistration> GetOwinMiddlewares() {
|
||||
var settings = _workContextAccessor.GetContext().CurrentSite.As<GoogleSettingsPart>();
|
||||
var workContext = _workContextAccessor.GetContext();
|
||||
var settings = workContext.CurrentSite.As<GoogleSettingsPart>();
|
||||
|
||||
if (settings == null || !settings.IsValid) {
|
||||
if (settings == null || !settings.IsValid()) {
|
||||
return Enumerable.Empty<OwinMiddlewareRegistration>();
|
||||
}
|
||||
|
||||
var authenticationOptions = new GoogleOAuth2AuthenticationOptions {
|
||||
ClientId = settings.ClientId,
|
||||
ClientSecret = settings.ClientSecret,
|
||||
CallbackPath = new PathString(settings.CallbackPath)
|
||||
CallbackPath = new PathString(GetCallbackPath(workContext, settings))
|
||||
};
|
||||
|
||||
return new List<OwinMiddlewareRegistration> {
|
||||
@@ -39,5 +41,16 @@ namespace Orchard.OpenId.OwinMiddlewares {
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
private string GetCallbackPath(WorkContext workContext, GoogleSettingsPart settings) {
|
||||
var shellSettings = workContext.Resolve<ShellSettings>();
|
||||
var tenantPrefix = shellSettings.RequestUrlPrefix;
|
||||
|
||||
var callbackUrl = string.IsNullOrWhiteSpace(tenantPrefix) ?
|
||||
settings.CallbackPath :
|
||||
string.Format("/{0}{1}", tenantPrefix, settings.CallbackPath);
|
||||
|
||||
return callbackUrl;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -20,7 +20,7 @@ namespace Orchard.OpenId.OwinMiddlewares {
|
||||
public IEnumerable<OwinMiddlewareRegistration> GetOwinMiddlewares() {
|
||||
var settings = _workContextAccessor.GetContext().CurrentSite.As<TwitterSettingsPart>();
|
||||
|
||||
if (settings == null || !settings.IsValid) {
|
||||
if (settings == null || !settings.IsValid()) {
|
||||
return Enumerable.Empty<OwinMiddlewareRegistration>();
|
||||
}
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace Orchard.OpenId.Providers {
|
||||
site = scope.Resolve<ISiteService>().GetSiteSettings();
|
||||
settings = site.As<ActiveDirectoryFederationServicesSettingsPart>();
|
||||
|
||||
return (settings != null && settings.IsValid);
|
||||
return (settings != null && settings.IsValid());
|
||||
}
|
||||
catch (Exception) {
|
||||
return false;
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace Orchard.OpenId.Providers {
|
||||
site = scope.Resolve<ISiteService>().GetSiteSettings();
|
||||
settings = site.As<AzureActiveDirectorySettingsPart>();
|
||||
|
||||
return (settings != null && settings.IsValid);
|
||||
return (settings != null && settings.IsValid());
|
||||
}
|
||||
catch (Exception) {
|
||||
return false;
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace Orchard.OpenId.Providers {
|
||||
site = scope.Resolve<ISiteService>().GetSiteSettings();
|
||||
settings = site.As<FacebookSettingsPart>();
|
||||
|
||||
return (settings != null && settings.IsValid);
|
||||
return (settings != null && settings.IsValid());
|
||||
}
|
||||
catch (Exception) {
|
||||
return false;
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace Orchard.OpenId.Providers {
|
||||
site = scope.Resolve<ISiteService>().GetSiteSettings();
|
||||
settings = site.As<GoogleSettingsPart>();
|
||||
|
||||
return (settings != null && settings.IsValid);
|
||||
return (settings != null && settings.IsValid());
|
||||
}
|
||||
catch (Exception) {
|
||||
return false;
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace Orchard.OpenId.Providers {
|
||||
site = scope.Resolve<ISiteService>().GetSiteSettings();
|
||||
settings = site.As<TwitterSettingsPart>();
|
||||
|
||||
return (settings != null && settings.IsValid);
|
||||
return (settings != null && settings.IsValid());
|
||||
}
|
||||
catch (Exception) {
|
||||
return false;
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace Orchard.Azure.Authentication.Services.ActiveDirectoryFederationService
|
||||
var workContext = _orchardServices.WorkContext;
|
||||
var settings = workContext.CurrentSite.As<ActiveDirectoryFederationServicesSettingsPart>();
|
||||
|
||||
if (settings == null || !settings.IsValid) {
|
||||
if (settings == null || !settings.IsValid()) {
|
||||
var url = _urlHelper.Action("OpenId", "Admin", new { Area = "Settings" });
|
||||
yield return new NotifyEntry { Message = T("The <a href=\"{0}\">Active Directory Federation Services settings</a> need to be configured.", url), Type = NotifyType.Warning };
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace Orchard.Azure.Authentication.Services.AzureActiveDirectory {
|
||||
var workContext = _orchardServices.WorkContext;
|
||||
var azureSettings = workContext.CurrentSite.As<AzureActiveDirectorySettingsPart>();
|
||||
|
||||
if (azureSettings == null || !azureSettings.IsValid) {
|
||||
if (azureSettings == null || !azureSettings.IsValid()) {
|
||||
var url = _urlHelper.Action("OpenId", "Admin", new { Area = "Settings" });
|
||||
yield return new NotifyEntry { Message = T("The <a href=\"{0}\">Azure AD Authentication settings</a> need to be configured.", url), Type = NotifyType.Warning };
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace Orchard.Azure.Authentication.Services.Facebook {
|
||||
var workContext = _orchardServices.WorkContext;
|
||||
var settings = workContext.CurrentSite.As<FacebookSettingsPart>();
|
||||
|
||||
if (settings == null || !settings.IsValid) {
|
||||
if (settings == null || !settings.IsValid()) {
|
||||
var url = _urlHelper.Action("OpenId", "Admin", new { Area = "Settings" });
|
||||
yield return new NotifyEntry { Message = T("The <a href=\"{0}\">Facebook settings</a> need to be configured.", url), Type = NotifyType.Warning };
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace Orchard.Azure.Authentication.Services.Google {
|
||||
var workContext = _orchardServices.WorkContext;
|
||||
var settings = workContext.CurrentSite.As<GoogleSettingsPart>();
|
||||
|
||||
if (settings == null || !settings.IsValid) {
|
||||
if (settings == null || !settings.IsValid()) {
|
||||
var url = _urlHelper.Action("OpenId", "Admin", new { Area = "Settings" });
|
||||
yield return new NotifyEntry { Message = T("The <a href=\"{0}\">Google settings</a> need to be configured.", url), Type = NotifyType.Warning };
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace Orchard.Azure.Authentication.Services.Twitter {
|
||||
var workContext = _orchardServices.WorkContext;
|
||||
var settings = workContext.CurrentSite.As<TwitterSettingsPart>();
|
||||
|
||||
if (settings == null || !settings.IsValid) {
|
||||
if (settings == null || !settings.IsValid()) {
|
||||
var url = _urlHelper.Action("OpenId", "Admin", new { Area = "Settings" });
|
||||
yield return new NotifyEntry { Message = T("The <a href=\"{0}\">Twitter settings</a> need to be configured.", url), Type = NotifyType.Warning };
|
||||
}
|
||||
|
||||
@@ -3,17 +3,17 @@
|
||||
|
||||
<h2>Active Directory Federation Services Settings</h2>
|
||||
<fieldset>
|
||||
@Html.LabelFor(m => m.ClientId, T("Client Id"))
|
||||
<label for="@Html.IdFor(m => m.ClientId)">@T("Client Id")</label>
|
||||
@Html.TextBoxFor(m => m.ClientId, new { @class = "text large" })
|
||||
<span class="hint">@T("ADFS's Client Id obtained from your ADFS configuration (e.g. {0})", ActiveDirectoryFederationServices.DefaultClientId)</span>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
@Html.LabelFor(m => m.MetadataAddress, T("Metadata Address"))
|
||||
<label for="@Html.IdFor(m => m.MetadataAddress)">@T("Metadata Address")</label>
|
||||
@Html.TextBoxFor(m => m.MetadataAddress, new { @class = "text large" })
|
||||
<span class="hint">@T("ADFS's Metadata Address url obtained from your ADFS configuration (e.g. {0})", ActiveDirectoryFederationServices.DefaultMetadataAddress)</span>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
@Html.LabelFor(m => m.PostLogoutRedirectUri, T("Post Logout Redirect Uri"))
|
||||
<label for="@Html.IdFor(m => m.PostLogoutRedirectUri)">@T("Post Logout Redirect Uri")</label>
|
||||
@Html.TextBoxFor(m => m.PostLogoutRedirectUri, new { @class = "text large" })
|
||||
<span class="hint">@T("ADFS's Post Logout Redirect url obtained from your ADFS configuration (e.g. {0})", ActiveDirectoryFederationServices.DefaultPostLogoutRedirectUri)</span>
|
||||
</fieldset>
|
||||
|
||||
@@ -2,31 +2,31 @@
|
||||
|
||||
<h2>Azure Active Directory Settings</h2>
|
||||
<fieldset>
|
||||
@Html.LabelFor(m => m.Tenant, T("Tenant"))
|
||||
<label for="@Html.IdFor(m => m.Tenant)">@T("Tenant")</label>
|
||||
@Html.TextBoxFor(m => m.Tenant, new { @class = "text large" })
|
||||
<span class="hint">@T("Azure Active Directory tenant (e.g. yoursite.onmicrosoft.com).")</span>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
@Html.LabelFor(m => m.ADInstance, T("Active Directory Instance"))
|
||||
<label for="@Html.IdFor(m => m.ADInstance)">@T("Active Directory Instance")</label>
|
||||
@Html.TextBoxFor(m => m.ADInstance, new { @class = "text large" })
|
||||
<span class="hint">@T("Default instance is https://login.microsoftonline.com/{your-tenant-name}")</span>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
@Html.LabelFor(m => m.ClientId, T("App ID"))
|
||||
<label for="@Html.IdFor(m => m.ClientId)">@T("App ID")</label>
|
||||
@Html.TextBoxFor(m => m.ClientId, new { @class = "text large" })
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
@Html.LabelFor(m => m.AppName, T("App Name"))
|
||||
<label for="@Html.IdFor(m => m.AppName)">@T("App Name")</label>
|
||||
@Html.TextBoxFor(m => m.AppName, new { @class = "text large" })
|
||||
<span class="hint">@T("The application name you wish to give active directory login rights to.")</span>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
@Html.LabelFor(m => m.LogoutRedirectUri, T("Logout Redirect"))
|
||||
<label for="@Html.IdFor(m => m.LogoutRedirectUri)">@T("Logout Redirect")</label>
|
||||
@Html.TextBoxFor(m => m.LogoutRedirectUri, new { @class = "text large" })
|
||||
<span class="hint">@T("Redirect url after azure logout, default is http://localhost:30321/OrchardLocal/")</span>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
@Html.LabelFor(m => m.ServiceResourceID, T("Service Resource ID"))
|
||||
<label for="@Html.IdFor(m => m.ServiceResourceID)">@T("Service Resource ID")</label>
|
||||
@Html.TextAreaFor(m => m.ServiceResourceID, new { @class = "text large" })
|
||||
<span class="hint">
|
||||
@T(@"If you have a single 'Service Resource ID' just write it down directly.
|
||||
@@ -35,32 +35,32 @@
|
||||
</span>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
@Html.LabelFor(m => m.AppKey, T("App Key"))
|
||||
<label for="@Html.IdFor(m => m.AppKey)">@T("App Key")</label>
|
||||
@Html.TextBoxFor(m => m.AppKey, new { @class = "text large" })
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
@Html.CheckBoxFor(m => m.BearerAuthEnabled)
|
||||
<label class="forcheckbox" for="AzureActiveDirectorySettings_BearerAuthEnabled">@T("Enable Bearer Token Authentication")</label>
|
||||
<label class="forcheckbox" for="@Html.IdFor(m => m.BearerAuthEnabled)">@T("Enable Bearer Token Authentication")</label>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
@Html.CheckBoxFor(m => m.SSLEnabled)
|
||||
<label class="forcheckbox" for="AzureActiveDirectorySettings_SSLEnabled">@T("Use SSL Protocol for valid audience")</label>
|
||||
<label class="forcheckbox" for="@Html.IdFor(m => m.SSLEnabled)">@T("Use SSL Protocol for valid audience")</label>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
@Html.CheckBoxFor(m => m.AzureWebSiteProtectionEnabled)
|
||||
<label class="forcheckbox" for="AzureActiveDirectorySettings_AzureWebSiteProtectionEnabled">@T("Enable Machine Key Data Protection for Azure Web Site")</label>
|
||||
<label class="forcheckbox" for="@Html.IdFor(m => m.AzureWebSiteProtectionEnabled)">@T("Enable Machine Key Data Protection for Azure Web Site")</label>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
@Html.CheckBoxFor(m => m.UseAzureGraphApi)
|
||||
<label class="forcheckbox" for="AzureActiveDirectorySettings_UseAzureGraphApi">@T("Enable Graph API")</label>
|
||||
<label class="forcheckbox" for="@Html.IdFor(m => m.UseAzureGraphApi)">@T("Enable Graph API")</label>
|
||||
<span class="hint">@T("Check this box to enable syncing Orchard Role membership to Azure Graph API Group Membership. This module will not create new Orchard Roles for you, but it will sync up user membership of existing Orchard Roles with AD Group membership for Role names that match a group name")</span>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
@Html.LabelFor(m => m.GraphApiUrl, T("Graph API URL"))
|
||||
<label for="@Html.IdFor(m => m.GraphApiUrl)">@T("Graph Api Url")</label>
|
||||
@Html.TextBoxFor(m => m.GraphApiUrl, new { @class = "text large" })
|
||||
<span class="hint">@T("Typically https://graph.windows.net")</span>
|
||||
|
||||
@Html.LabelFor(m => m.GraphApiKey, T("Graph API Key"))
|
||||
<label for="@Html.IdFor(m => m.GraphApiKey)">@T("Graph Api Key")</label>
|
||||
@Html.TextBoxFor(m => m.GraphApiKey, new { @class = "text large" })
|
||||
</fieldset>
|
||||
<hr />
|
||||
@@ -3,12 +3,12 @@
|
||||
|
||||
<h2>Facebook Settings</h2>
|
||||
<fieldset>
|
||||
@Html.LabelFor(m => m.AppId, T("App Id"))
|
||||
<label for="@Html.IdFor(m => m.AppId)">@T("App Id")</label>
|
||||
@Html.TextBoxFor(m => m.AppId, new { @class = "text large" })
|
||||
<span class="hint">@T("Facebook's App Id obtained from your facebook developer dashboard (e.g. {0})", Facebook.DefaultAppId)</span>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
@Html.LabelFor(m => m.AppSecret, T("App Secret"))
|
||||
<label for="@Html.IdFor(m => m.AppSecret)">@T("App Secret")</label>
|
||||
@Html.TextBoxFor(m => m.AppSecret, new { @class = "text large" })
|
||||
<span class="hint">@T("Facebook's App Secret obtained from your facebook developer dashboard (e.g. {0})", Facebook.DefaultAppSecret)</span>
|
||||
</fieldset>
|
||||
|
||||
@@ -3,17 +3,17 @@
|
||||
|
||||
<h2>Google Settings</h2>
|
||||
<fieldset>
|
||||
@Html.LabelFor(m => m.ClientId, T("Client Id"))
|
||||
<label for="@Html.IdFor(m => m.ClientId)">@T("Client Id")</label>
|
||||
@Html.TextBoxFor(m => m.ClientId, new { @class = "text large" })
|
||||
<span class="hint">@T("Google's Client Id obtained from your google dashboard (e.g. {0})", Google.DefaultClientId)</span>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
@Html.LabelFor(m => m.ClientSecret, T("Client Secret"))
|
||||
<label for="@Html.IdFor(m => m.ClientSecret)">@T("Client Secret")</label>
|
||||
@Html.TextBoxFor(m => m.ClientSecret, new { @class = "text large" })
|
||||
<span class="hint">@T("Google's Client Secret obtained from your google dashboard (e.g. {0})", Google.DefaultClientSecret)</span>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
@Html.LabelFor(m => m.CallbackPath, T("Callback Path"))
|
||||
<label for="@Html.IdFor(m => m.CallbackPath)">@T("Callback Path")</label>
|
||||
@Html.TextBoxFor(m => m.CallbackPath, new { @class = "text large" })
|
||||
<span class="hint">@T("Google's Callback Path obtained from your google dashboard (case sensitive). Recommended: {0}", General.LogonCallbackUrl)</span>
|
||||
</fieldset>
|
||||
|
||||
@@ -9,12 +9,12 @@
|
||||
|
||||
<h2>@T("Twitter Settings")</h2>
|
||||
<fieldset>
|
||||
@Html.LabelFor(m => m.ConsumerKey, T("Consumer Key"))
|
||||
<label for="@Html.IdFor(m => m.ConsumerKey)">@T("Consumer Key")</label>
|
||||
@Html.TextBoxFor(m => m.ConsumerKey, new { @class = "text large" })
|
||||
<span class="hint">@T("Twitter's Consumer Key obtained from your twitter dashboard (e.g. {0})", Twitter.DefaultConsumerKey)</span>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
@Html.LabelFor(m => m.ConsumerSecret, T("Consumer Secret"))
|
||||
<label for="@Html.IdFor(m => m.ConsumerSecret)">@T("Consumer Secret")</label>
|
||||
@Html.TextBoxFor(m => m.ConsumerSecret, new { @class = "text large" })
|
||||
<span class="hint">@T("Twitter's Consumer Secret obtained from your twitter dashboard (e.g. {0})", Twitter.DefaultConsumerSecret)</span>
|
||||
</fieldset>
|
||||
@@ -26,22 +26,22 @@
|
||||
<div id="colExpArea" class="coll-exp-area">
|
||||
<span class="hint">@T("These settings rarely change, it is recommended to keep default values")</span>
|
||||
|
||||
@Html.LabelFor(m => m.VeriSignClass3SecureServerCA_G2, T("VeriSign Class3 Secure Server CA - G2"))
|
||||
<label for="@Html.IdFor(m => m.VeriSignClass3SecureServerCA_G2)">@T("VeriSign Class3 Secure Server CA - G2")</label>
|
||||
@Html.TextBoxFor(m => m.VeriSignClass3SecureServerCA_G2, new { @class = "text large" })
|
||||
|
||||
@Html.LabelFor(m => m.VeriSignClass3SecureServerCA_G3, T("VeriSign Class3 Secure Server CA - G3"))
|
||||
<label for="@Html.IdFor(m => m.VeriSignClass3SecureServerCA_G3)">@T("VeriSign Class3 Secure Server CA - G3")</label>
|
||||
@Html.TextBoxFor(m => m.VeriSignClass3SecureServerCA_G3, new { @class = "text large" })
|
||||
|
||||
@Html.LabelFor(m => m.VeriSignClass3PublicPrimaryCA_G5, T("VeriSign Class3 Secure Server CA - G5"))
|
||||
<label for="@Html.IdFor(m => m.VeriSignClass3PublicPrimaryCA_G5)">@T("VeriSign Class3 Secure Server CA - G5")</label>
|
||||
@Html.TextBoxFor(m => m.VeriSignClass3PublicPrimaryCA_G5, new { @class = "text large" })
|
||||
|
||||
@Html.LabelFor(m => m.SymantecClass3SecureServerCA_G4, T("Symantec Class3 Secure Server CA - G4"))
|
||||
<label for="@Html.IdFor(m => m.SymantecClass3SecureServerCA_G4)">@T("Symantec Class3 Secure Server CA - G4")</label>
|
||||
@Html.TextBoxFor(m => m.SymantecClass3SecureServerCA_G4, new { @class = "text large" })
|
||||
|
||||
@Html.LabelFor(m => m.DigiCertSHA2HighAssuranceServerCA, T("DigiCert SHA2 High Assurance Server CA"))
|
||||
<label for="@Html.IdFor(m => m.DigiCertSHA2HighAssuranceServerCA)">@T("DigiCert SHA2 High Assurance Server CA")</label>
|
||||
@Html.TextBoxFor(m => m.DigiCertSHA2HighAssuranceServerCA, new { @class = "text large" })
|
||||
|
||||
@Html.LabelFor(m => m.DigiCertHighAssuranceEVRootCA, T("DigiCert High Assurance EV Root CA"))
|
||||
<label for="@Html.IdFor(m => m.DigiCertHighAssuranceEVRootCA)">@T("DigiCert High Assurance EV Root CA")</label>
|
||||
@Html.TextBoxFor(m => m.DigiCertHighAssuranceEVRootCA, new { @class = "text large" })
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
@@ -260,16 +260,7 @@
|
||||
<VisualStudio>
|
||||
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
|
||||
<WebProjectProperties>
|
||||
<UseIIS>True</UseIIS>
|
||||
<AutoAssignPort>False</AutoAssignPort>
|
||||
<DevelopmentServerPort>30321</DevelopmentServerPort>
|
||||
<DevelopmentServerVPath>/OrchardLocal</DevelopmentServerVPath>
|
||||
<IISUrl>http://localhost:30321/OrchardLocal</IISUrl>
|
||||
<NTLMAuthentication>False</NTLMAuthentication>
|
||||
<UseCustomServer>False</UseCustomServer>
|
||||
<CustomServerUrl>
|
||||
</CustomServerUrl>
|
||||
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
|
||||
<SaveServerSettingsInUserFile>True</SaveServerSettingsInUserFile>
|
||||
</WebProjectProperties>
|
||||
</FlavorProperties>
|
||||
</VisualStudio>
|
||||
|
||||
Reference in New Issue
Block a user