+ @T("You do not have permission to complete your request.")
+
\ No newline at end of file
diff --git a/src/Orchard.Web/Modules/Orchard.OpenId/Views/Account/Error.cshtml b/src/Orchard.Web/Modules/Orchard.OpenId/Views/Account/Error.cshtml
new file mode 100644
index 000000000..d4190517e
--- /dev/null
+++ b/src/Orchard.Web/Modules/Orchard.OpenId/Views/Account/Error.cshtml
@@ -0,0 +1 @@
+@T("Oops, Something went wrong with your authentication!")
diff --git a/src/Orchard.Web/Modules/Orchard.OpenId/Views/Account/Logon.cshtml b/src/Orchard.Web/Modules/Orchard.OpenId/Views/Account/Logon.cshtml
new file mode 100644
index 000000000..d2e61b04c
--- /dev/null
+++ b/src/Orchard.Web/Modules/Orchard.OpenId/Views/Account/Logon.cshtml
@@ -0,0 +1,39 @@
+@model IEnumerable
+@using Orchard.OpenId.Services
+@using Orchard.Utility.Extensions
+
+Logon
+
+
+@using (Html.BeginFormAntiForgeryPost(Url.Action("LogOn", "Account", new { Area = "Orchard.Users", ReturnUrl = Request.QueryString["ReturnUrl"] }))) {
+
+ @T("Account Information")
+
+
+ @T("Username")
+ @Html.TextBox("userNameOrEmail", "", new { id = "username-email", autofocus = "autofocus" })
+ @Html.ValidationMessage("userNameOrEmail")
+
+
+ @T("Password")
+ @Html.Password("password")
+ @Html.ValidationMessage("password")
+
+
+ @Html.CheckBox("rememberMe", new { id = "remember-me" })@T("Remember Me")
+
+
+ @T("Sign In")
+
+}
+
+Or choose your OpenId account provider
+
+
+@foreach (var provider in Model) {
+ if (provider.IsValid) {
+
+ @provider.DisplayName
+
+ }
+}
diff --git a/src/Orchard.Web/Modules/Orchard.OpenId/Views/EditorTemplates/Parts.ActiveDirectoryFederationServicesSettings.cshtml b/src/Orchard.Web/Modules/Orchard.OpenId/Views/EditorTemplates/Parts.ActiveDirectoryFederationServicesSettings.cshtml
new file mode 100644
index 000000000..5e2b8a4c2
--- /dev/null
+++ b/src/Orchard.Web/Modules/Orchard.OpenId/Views/EditorTemplates/Parts.ActiveDirectoryFederationServicesSettings.cshtml
@@ -0,0 +1,20 @@
+@model Orchard.OpenId.Models.ActiveDirectoryFederationServicesSettingsPart
+@using Orchard.OpenId
+
+Active Directory Federation Services Settings
+
+ @Html.LabelFor(m => m.ClientId, T("Client Id"))
+ @Html.TextBoxFor(m => m.ClientId, new { @class = "text large" })
+ @T("ADFS's Client Id obtained from your ADFS configuration (e.g. {0})", Constants.DefaultAdfsClientId)
+
+
+ @Html.LabelFor(m => m.MetadataAddress, T("Metadata Address"))
+ @Html.TextBoxFor(m => m.MetadataAddress, new { @class = "text large" })
+ @T("ADFS's Metadata Address url obtained from your ADFS configuration (e.g. {0})", Constants.DefaultAdfsMetadataAddress)
+
+
+ @Html.LabelFor(m => m.PostLogoutRedirectUri, T("Post Logout Redirect Uri"))
+ @Html.TextBoxFor(m => m.PostLogoutRedirectUri, new { @class = "text large" })
+ @T("ADFS's Post Logout Redirect url obtained from your ADFS configuration (e.g. {0})", Constants.DefaultAdfsPostLogoutRedirectUri)
+
+
\ No newline at end of file
diff --git a/src/Orchard.Web/Modules/Orchard.OpenId/Views/EditorTemplates/Parts.AzureActiveDirectorySettings.cshtml b/src/Orchard.Web/Modules/Orchard.OpenId/Views/EditorTemplates/Parts.AzureActiveDirectorySettings.cshtml
new file mode 100644
index 000000000..e014536fb
--- /dev/null
+++ b/src/Orchard.Web/Modules/Orchard.OpenId/Views/EditorTemplates/Parts.AzureActiveDirectorySettings.cshtml
@@ -0,0 +1,63 @@
+@model Orchard.OpenId.Models.AzureActiveDirectorySettingsPart
+
+Azure Active Directory Settings
+
+ @Html.LabelFor(m => m.Tenant, T("Tenant"))
+ @Html.TextBoxFor(m => m.Tenant, new { @class = "text large" })
+ @T("Azure Active Directory tenant (e.g. yoursite.onmicrosoft.com).")
+
+
+ @Html.LabelFor(m => m.ADInstance, T("Active Directory Instance"))
+ @Html.TextBoxFor(m => m.ADInstance, new { @class = "text large" })
+ @T("Default instance is https://login.microsoftonline.com/{your-tenant-name}")
+
+
+ @Html.LabelFor(m => m.ClientId, T("App ID"))
+ @Html.TextBoxFor(m => m.ClientId, new { @class = "text large" })
+
+
+ @Html.LabelFor(m => m.AppName, T("App Name"))
+ @Html.TextBoxFor(m => m.AppName, new { @class = "text large" })
+ @T("The application name you wish to give active directory login rights to.")
+
+
+ @Html.LabelFor(m => m.LogoutRedirectUri, T("Logout Redirect"))
+ @Html.TextBoxFor(m => m.LogoutRedirectUri, new { @class = "text large" })
+ @T("Redirect url after azure logout, default is http://localhost:30321/OrchardLocal/")
+
+
+ @Html.LabelFor(m => m.ServiceResourceID, T("Service Resource ID"))
+ @Html.TextAreaFor(m => m.ServiceResourceID, new { @class = "text large" })
+
+ @T(@"If you have a single 'Service Resource ID' just write it down directly.
+ If you have multiple resources, enter each resource id on its own line, using key=value pairs.
+ Example: service1=https://yoursite.onmicrosoft.com/some-guid-for-service1")
+
+
+
+ @Html.LabelFor(m => m.AppKey, T("App Key"))
+ @Html.TextBoxFor(m => m.AppKey, new { @class = "text large" })
+
+
+ @Html.CheckBoxFor(m => m.BearerAuthEnabled)
+ @T("Enable Bearer Token Authentication")
+
+
+ @Html.CheckBoxFor(m => m.SSLEnabled)
+ @T("Use SSL Protocol for valid audience")
+
+
+ @Html.CheckBoxFor(m => m.AzureWebSiteProtectionEnabled)
+ @T("Enable Machine Key Data Protection for Azure Web Site")
+
+
+ @Html.CheckBoxFor(m => m.UseAzureGraphApi)
+ @T("Enable Graph API")
+ @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")
+
+
+ @Html.LabelFor(m => m.GraphApiUrl, T("Graph API URL"))
+ @Html.TextBoxFor(m => m.GraphApiUrl, new { @class = "text large" })
+ @T("Typically https://graph.windows.net")
+
+
\ No newline at end of file
diff --git a/src/Orchard.Web/Modules/Orchard.OpenId/Views/EditorTemplates/Parts.FacebookSettings.cshtml b/src/Orchard.Web/Modules/Orchard.OpenId/Views/EditorTemplates/Parts.FacebookSettings.cshtml
new file mode 100644
index 000000000..b354e3daf
--- /dev/null
+++ b/src/Orchard.Web/Modules/Orchard.OpenId/Views/EditorTemplates/Parts.FacebookSettings.cshtml
@@ -0,0 +1,15 @@
+@model Orchard.OpenId.Models.FacebookSettingsPart
+@using Orchard.OpenId
+
+Facebook Settings
+
+ @Html.LabelFor(m => m.AppId, T("App Id"))
+ @Html.TextBoxFor(m => m.AppId, new { @class = "text large" })
+ @T("Facebook's App Id obtained from your facebook developer dashboard (e.g. {0})", Constants.DefaultFacebookAppId)
+
+
+ @Html.LabelFor(m => m.AppSecret, T("App Secret"))
+ @Html.TextBoxFor(m => m.AppSecret, new { @class = "text large" })
+ @T("Facebook's App Secret obtained from your facebook developer dashboard (e.g. {0})", Constants.DefaultFacebookAppSecret)
+
+
\ No newline at end of file
diff --git a/src/Orchard.Web/Modules/Orchard.OpenId/Views/EditorTemplates/Parts.GoogleSettings.cshtml b/src/Orchard.Web/Modules/Orchard.OpenId/Views/EditorTemplates/Parts.GoogleSettings.cshtml
new file mode 100644
index 000000000..dfba84f83
--- /dev/null
+++ b/src/Orchard.Web/Modules/Orchard.OpenId/Views/EditorTemplates/Parts.GoogleSettings.cshtml
@@ -0,0 +1,20 @@
+@model Orchard.OpenId.Models.GoogleSettingsPart
+@using Orchard.OpenId
+
+Google Settings
+
+ @Html.LabelFor(m => m.ClientId, T("Client Id"))
+ @Html.TextBoxFor(m => m.ClientId, new { @class = "text large" })
+ @T("Google's Client Id obtained from your google dashboard (e.g. {0})", Constants.DefaultGoogleClientId)
+
+
+ @Html.LabelFor(m => m.ClientSecret, T("Client Secret"))
+ @Html.TextBoxFor(m => m.ClientSecret, new { @class = "text large" })
+ @T("Google's Client Secret obtained from your google dashboard (e.g. {0})", Constants.DefaultGoogleClientSecret)
+
+
+ @Html.LabelFor(m => m.CallbackPath, T("Callback Path"))
+ @Html.TextBoxFor(m => m.CallbackPath, new { @class = "text large" })
+ @T("Google's Callback Path obtained from your google dashboard (case sensitive). Recommended: {0}", Constants.LogonCallbackUrl)
+
+
\ No newline at end of file
diff --git a/src/Orchard.Web/Modules/Orchard.OpenId/Views/EditorTemplates/Parts.TwitterSettings.cshtml b/src/Orchard.Web/Modules/Orchard.OpenId/Views/EditorTemplates/Parts.TwitterSettings.cshtml
new file mode 100644
index 000000000..d4d29806f
--- /dev/null
+++ b/src/Orchard.Web/Modules/Orchard.OpenId/Views/EditorTemplates/Parts.TwitterSettings.cshtml
@@ -0,0 +1,48 @@
+@model Orchard.OpenId.Models.TwitterSettingsPart
+@using Orchard.OpenId;
+@{
+ Style.Include("TwitterAdmin").AtHead();
+
+ Script.Require("jQuery");
+ Script.Require("TwitterAdmin").AtFoot();
+}
+
+@T("Twitter Settings")
+
+ @Html.LabelFor(m => m.ConsumerKey, T("Consumer Key"))
+ @Html.TextBoxFor(m => m.ConsumerKey, new { @class = "text large" })
+ @T("Twitter's Consumer Key obtained from your twitter dashboard (e.g. {0})", Constants.DefaultTwitterConsumerKey)
+
+
+ @Html.LabelFor(m => m.ConsumerSecret, T("Consumer Secret"))
+ @Html.TextBoxFor(m => m.ConsumerSecret, new { @class = "text large" })
+ @T("Twitter's Consumer Secret obtained from your twitter dashboard (e.g. {0})", Constants.DefaultTwitterConsumerSecret)
+
+
+
+ @T("Certificate Subject Key Identifiers")
+ +
+
+
+ @T("These settings rarely change, it is recommended to keep default values")
+
+ @Html.LabelFor(m => m.VeriSignClass3SecureServerCA_G2, T("VeriSign Class3 Secure Server CA - G2"))
+ @Html.TextBoxFor(m => m.VeriSignClass3SecureServerCA_G2, new { @class = "text large" })
+
+ @Html.LabelFor(m => m.VeriSignClass3SecureServerCA_G3, T("VeriSign Class3 Secure Server CA - G3"))
+ @Html.TextBoxFor(m => m.VeriSignClass3SecureServerCA_G3, new { @class = "text large" })
+
+ @Html.LabelFor(m => m.VeriSignClass3PublicPrimaryCA_G5, T("VeriSign Class3 Secure Server CA - G5"))
+ @Html.TextBoxFor(m => m.VeriSignClass3PublicPrimaryCA_G5, new { @class = "text large" })
+
+ @Html.LabelFor(m => m.SymantecClass3SecureServerCA_G4, T("Symantec Class3 Secure Server CA - G4"))
+ @Html.TextBoxFor(m => m.SymantecClass3SecureServerCA_G4, new { @class = "text large" })
+
+ @Html.LabelFor(m => m.DigiCertSHA2HighAssuranceServerCA, T("DigiCert SHA2 High Assurance Server CA"))
+ @Html.TextBoxFor(m => m.DigiCertSHA2HighAssuranceServerCA, new { @class = "text large" })
+
+ @Html.LabelFor(m => m.DigiCertHighAssuranceEVRootCA, T("DigiCert High Assurance EV Root CA"))
+ @Html.TextBoxFor(m => m.DigiCertHighAssuranceEVRootCA, new { @class = "text large" })
+
+
+
\ No newline at end of file
diff --git a/src/Orchard.Web/Modules/Orchard.OpenId/Views/User.cshtml b/src/Orchard.Web/Modules/Orchard.OpenId/Views/User.cshtml
new file mode 100644
index 000000000..b4415b4fe
--- /dev/null
+++ b/src/Orchard.Web/Modules/Orchard.OpenId/Views/User.cshtml
@@ -0,0 +1,16 @@
+
+ @if (WorkContext.CurrentUser != null) {
+
+ @T("Welcome, {0} !", Html.ItemDisplayText(WorkContext.CurrentUser))
+
+
+ @Html.ActionLink(T("Sign Out").ToString(), "LogOff", new { Controller = "Account", Area = "Orchard.Users", ReturnUrl = Context.Request.RawUrl }, new { rel = "nofollow" })
+ @if (AuthorizedFor(Orchard.Security.StandardPermissions.AccessAdminPanel)) {
+ @Html.ActionLink(T("Dashboard").ToString(), "Index", new { Area = "Dashboard", Controller = "Admin" })
+ }
+
+ }
+ else {
+ @Html.ActionLink(T("Sign In").ToString(), "LogOn", new { Controller = "Account", Area = "Orchard.Users", ReturnUrl = (Request.QueryString["ReturnUrl"] ?? Request.RawUrl) }, new { rel = "nofollow" })
+ }
+
\ No newline at end of file
diff --git a/src/Orchard.Web/Modules/Orchard.OpenId/Web.config b/src/Orchard.Web/Modules/Orchard.OpenId/Web.config
new file mode 100644
index 000000000..a672c0116
--- /dev/null
+++ b/src/Orchard.Web/Modules/Orchard.OpenId/Web.config
@@ -0,0 +1,110 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Orchard.Web/Modules/Orchard.OpenId/packages.config b/src/Orchard.Web/Modules/Orchard.OpenId/packages.config
new file mode 100644
index 000000000..426d92fcb
--- /dev/null
+++ b/src/Orchard.Web/Modules/Orchard.OpenId/packages.config
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Orchard.Web/Modules/Orchard.OpenId/placement.info b/src/Orchard.Web/Modules/Orchard.OpenId/placement.info
new file mode 100644
index 000000000..22375f7eb
--- /dev/null
+++ b/src/Orchard.Web/Modules/Orchard.OpenId/placement.info
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
diff --git a/src/Orchard.Web/Orchard.Web.csproj b/src/Orchard.Web/Orchard.Web.csproj
index affa5891c..b61922943 100644
--- a/src/Orchard.Web/Orchard.Web.csproj
+++ b/src/Orchard.Web/Orchard.Web.csproj
@@ -58,12 +58,12 @@
..\packages\log4net.2.0.3\lib\net40-full\log4net.dll
True
-
- ..\packages\Microsoft.Owin.3.0.0\lib\net45\Microsoft.Owin.dll
+
+ ..\packages\Microsoft.Owin.3.0.1\lib\net45\Microsoft.Owin.dll
True
-
- ..\packages\Microsoft.Owin.Host.SystemWeb.3.0.0\lib\net45\Microsoft.Owin.Host.SystemWeb.dll
+
+ ..\packages\Microsoft.Owin.Host.SystemWeb.3.0.1\lib\net45\Microsoft.Owin.Host.SystemWeb.dll
True
diff --git a/src/Orchard.Web/Web.config b/src/Orchard.Web/Web.config
index 13876a268..498935318 100644
--- a/src/Orchard.Web/Web.config
+++ b/src/Orchard.Web/Web.config
@@ -58,7 +58,7 @@
-
+
@@ -233,6 +233,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Orchard.Web/packages.config b/src/Orchard.Web/packages.config
index 58584142c..2d86de373 100644
--- a/src/Orchard.Web/packages.config
+++ b/src/Orchard.Web/packages.config
@@ -5,8 +5,8 @@
-
-
+
+
diff --git a/src/Orchard.sln b/src/Orchard.sln
index 099fec29e..d39af0ee4 100644
--- a/src/Orchard.sln
+++ b/src/Orchard.sln
@@ -278,6 +278,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orchard.Resources", "Orchar
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orchard.Azure.Tests", "Orchard.Azure.Tests\Orchard.Azure.Tests.csproj", "{1CC62F45-E6FF-43D5-84BF-509A1085D994}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Orchard.OpenId", "Orchard.Web\Modules\Orchard.OpenId\Orchard.OpenId.csproj", "{42E217C1-E163-4B6B-9E8F-42BEE21B6896}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
CodeCoverage|Any CPU = CodeCoverage|Any CPU
@@ -1114,6 +1116,13 @@ Global
{1CC62F45-E6FF-43D5-84BF-509A1085D994}.FxCop|Any CPU.Build.0 = Release|Any CPU
{1CC62F45-E6FF-43D5-84BF-509A1085D994}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1CC62F45-E6FF-43D5-84BF-509A1085D994}.Release|Any CPU.Build.0 = Release|Any CPU
+ {42E217C1-E163-4B6B-9E8F-42BEE21B6896}.CodeCoverage|Any CPU.ActiveCfg = Release|Any CPU
+ {42E217C1-E163-4B6B-9E8F-42BEE21B6896}.Coverage|Any CPU.ActiveCfg = Release|Any CPU
+ {42E217C1-E163-4B6B-9E8F-42BEE21B6896}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {42E217C1-E163-4B6B-9E8F-42BEE21B6896}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {42E217C1-E163-4B6B-9E8F-42BEE21B6896}.FxCop|Any CPU.ActiveCfg = Release|Any CPU
+ {42E217C1-E163-4B6B-9E8F-42BEE21B6896}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {42E217C1-E163-4B6B-9E8F-42BEE21B6896}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -1202,6 +1211,7 @@ Global
{98251EAE-A41B-47B2-AA91-E28B8482DA70} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5}
{D4E8F7C8-2DB2-4C50-A422-DA1DF1E3CC73} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5}
{1CC62F45-E6FF-43D5-84BF-509A1085D994} = {74E681ED-FECC-4034-B9BD-01B0BB1BDECA}
+ {42E217C1-E163-4B6B-9E8F-42BEE21B6896} = {E9C9F120-07BA-4DFB-B9C3-3AFB9D44C9D5}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
EnterpriseLibraryConfigurationToolBinariesPath = packages\TransientFaultHandling.Core.5.1.1209.1\lib\NET4
diff --git a/src/Orchard/Orchard.Framework.csproj b/src/Orchard/Orchard.Framework.csproj
index 402f93b97..498842d98 100644
--- a/src/Orchard/Orchard.Framework.csproj
+++ b/src/Orchard/Orchard.Framework.csproj
@@ -84,8 +84,8 @@
True
-
- ..\packages\Microsoft.Owin.3.0.0\lib\net45\Microsoft.Owin.dll
+
+ ..\packages\Microsoft.Owin.3.0.1\lib\net45\Microsoft.Owin.dll
True
diff --git a/src/Orchard/packages.config b/src/Orchard/packages.config
index 2a043ca44..2bfae8874 100644
--- a/src/Orchard/packages.config
+++ b/src/Orchard/packages.config
@@ -12,7 +12,7 @@
-
+