Updates build process to include building a nuget Identity package to provide extensibility points in Umbraco.

This commit is contained in:
Shannon
2015-03-30 20:13:03 +11:00
parent 394cab5ab4
commit 1de9dbf18c
14 changed files with 92 additions and 20 deletions

View File

@@ -1,9 +0,0 @@
# The MIT License (MIT) #
Copyright (c) 2013 Umbraco
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@@ -56,6 +56,7 @@ REN .\_BuildOutput\WebApp\Xslt\Web.config Web.config.transform
ECHO Packing the NuGet release files
..\src\.nuget\NuGet.exe Pack NuSpecs\UmbracoCms.Core.nuspec -Version %version%
..\src\.nuget\NuGet.exe Pack NuSpecs\UmbracoCms.nuspec -Version %version%
..\src\.nuget\NuGet.exe Pack NuSpecs\UmbracoCms.Identity.nuspec
IF ERRORLEVEL 1 GOTO :showerror

View File

@@ -88,6 +88,7 @@
<WebAppFolderAbsolutePath>$(BuildFolderAbsolutePath)WebApp\</WebAppFolderAbsolutePath>
<WebPiFolderRelativeToProjects>$(BuildFolderRelativeToProjects)WebPi\</WebPiFolderRelativeToProjects>
<WebPiFolderAbsolutePath>$(BuildFolderAbsolutePath)WebPi\</WebPiFolderAbsolutePath>
<IdentityTemplatesPath>$(BuildFolderAbsolutePath)IdentityTemplates\</IdentityTemplatesPath>
</PropertyGroup>
<ItemGroup>
@@ -157,6 +158,28 @@
<Message Text="Finished zipping to build\$(BuildFolder)\$(buildDate)-$(BuildZipFileName)" Importance="high" />
</Target>
<Target Name="MakeIdentityTemplateFiles" DependsOnTargets="CreateSystemFolders" >
<Message Text="Starting to create Umbraco Identity template files" Importance="high" />
<ItemGroup>
<IdentityFiles Include="..\src\Umbraco.Web.UI\App_Start\Umbraco*.cs" />
</ItemGroup>
<!-- Copy and rename to be suffixed with .pp extension for nuget templates -->
<Copy SourceFiles="@(IdentityFiles)"
DestinationFiles="@(IdentityFiles->'$(IdentityTemplatesPath)App_Start\%(RecursiveDir)%(Filename)%(Extension).pp')" />
<!-- Replace the namespace with the token for each file for nuget templates -->
<ItemGroup>
<IdentityTemplateFiles Include="$(IdentityTemplatesPath)\**\*.pp" />
</ItemGroup>
<FileUpdate
Files="@(IdentityTemplateFiles)"
Regex=" Umbraco\.Web\.UI"
ReplacementText=" $rootnamespace$"/>
</Target>
<Target Name="CreateSystemFolders" DependsOnTargets="CopyBelleBuild" Inputs="@(SystemFolders)" Outputs="%(Identity).Dummy">
<MakeDir Directories="@(SystemFolders)" />
</Target>
@@ -266,6 +289,7 @@
<Message Text="Finished compiling projects" Importance="high" />
</Target>
<Target Name="SetVersionNumber" Condition="'$(BUILD_RELEASE)'!=''">
<PropertyGroup>
<NewVersion>$(BUILD_RELEASE)</NewVersion>

View File

@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata minClientVersion="2.8">
<id>UmbracoCms.Identity</id>
<version>1.0.0</version>
<title>Umbraco Extensibility for ASP.Net Identity</title>
<authors>Umbraco HQ</authors>
<owners>Umbraco HQ</owners>
<licenseUrl>http://opensource.org/licenses/MIT</licenseUrl>
<projectUrl>http://umbraco.com/</projectUrl>
<iconUrl>http://umbraco.com/media/357769/100px_transparent.png</iconUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Installs files/classes to help with ASP.Net Identity extensibility for Umbraco back office</description>
<summary>Installs classes to help with ASP.Net Identity extensibility for Umbraco</summary>
<language>en-US</language>
<tags>umbraco aspnet identity</tags>
<dependencies>
<dependency id="UmbracoCms" version="[7.3.0, 8.0.0)" />
</dependencies>
</metadata>
<files>
<file src="..\_BuildOutput\IdentityTemplates\App_Start\**\*.pp" target="content\App_Start" />
</files>
</package>

View File

@@ -0,0 +1,33 @@
_ _ __ __ ____ _____ _____ ____
| | | | \/ | _ \| __ \ /\ / ____/ __ \
| | | | \ / | |_) | |__) | / \ | | | | | |
| | | | |\/| | _ <| _ / / /\ \| | | | | |
| |__| | | | | |_) | | \ \ / ____ | |___| |__| |
\____/|_| |_|____/|_| \_/_/ \_\_____\____/
----------------------------------------------------
Umbraco extensibility code has been installed for ASP.Net Identity with Umbraco back office users
The files have been installed into your App_Start folder if you have a Web Application project
or into App_Code if you have a Website project.
All of these files include lots of code comments, documentation & notes to assist with extending
the ASP.Net Identity implementaion for back office users in Umbraco. For all 3rd party
ASP.Net providers, their dependencies will need to be manually installed. See comments in the
following files for full details:
* StandardUmbracoOwinStartup.cs Includes code snippets to enable 3rd party ASP.Net Identity
providers to work with the Umbraco back office.
To enable the 'StandardUmbracoOwinStartup', update the web.config
appSetting "owin:appStartup" to be: "StandardUmbracoOwinStartup"
* UmbracoCustomOwinStartup Includes code snippets to customize the Umbraco ASP.Net
Identity implementation for back office users as well as
snippets to enable 3rd party ASP.Net Identity providers to work.
To enable the 'UmbracoCustomOwinStartup', update the web.config
appSetting "owin:appStartup" to be: "UmbracoCustomOwinStartup"
* UmbracoBackOfficeAuthExtensions Includes extension methods snippets to enable 3rd party ASP.Net
Identity providers to work with the Umbraco back office.

View File

@@ -5,7 +5,7 @@ using Umbraco.Core.Security;
using Umbraco.Web.Security.Identity;
using Umbraco.Web.UI;
[assembly: OwinStartup("CustomUmbracoStartup", typeof(StandardUmbracoOwinStartup))]
[assembly: OwinStartup("CustomUmbracoOwinStartup", typeof(StandardUmbracoOwinStartup))]
namespace Umbraco.Web.UI
{

View File

@@ -5,7 +5,7 @@ using Umbraco.Core.Security;
using Umbraco.Web.Security.Identity;
using Umbraco.Web.UI;
[assembly: OwinStartup("StandardUmbracoStartup", typeof(StandardUmbracoOwinStartup))]
[assembly: OwinStartup("StandardUmbracoOwinStartup", typeof(StandardUmbracoOwinStartup))]
namespace Umbraco.Web.UI
{

View File

@@ -357,9 +357,6 @@
<Compile Include="..\SolutionInfo.cs">
<Link>Properties\SolutionInfo.cs</Link>
</Compile>
<Compile Include="App_Start\CustomUmbracoOwinStartup.cs" />
<Compile Include="App_Start\StandardUmbracoOwinStartup.cs" />
<Compile Include="App_Start\UmbracoBackOfficeAuthExtensions.cs" />
<Compile Include="Umbraco\Install\Legacy\LoadStarterKits.ascx.cs">
<DependentUpon>loadStarterKits.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
@@ -2557,6 +2554,7 @@
<Folder Include="App_Code\" />
<Folder Include="App_Data\" />
<Folder Include="App_Plugins\" />
<Folder Include="App_Start\" />
<Folder Include="Css\" />
<Folder Include="MasterPages\" />
<Folder Include="Media\" />

View File

@@ -10,7 +10,7 @@ NOTES:
* Compression/Combination/Minification is not enabled unless debug="false" is specified on the 'compiliation' element in the web.config
* A new version will invalidate both client and server cache and create new persisted files
-->
<clientDependency version="366385329" fileDependencyExtensions=".js,.css" loggerType="Umbraco.Web.UI.CdfLogger, umbraco">
<clientDependency version="1465049132" fileDependencyExtensions=".js,.css" loggerType="Umbraco.Web.UI.CdfLogger, umbraco">
<!--
This section is used for Web Forms only, the enableCompositeFiles="true" is optional and by default is set to true.

View File

@@ -61,7 +61,7 @@
<add key="enableSimpleMembership" value="false" />
<add key="autoFormsAuthentication" value="false" />
<add key="log4net.Config" value="config\log4net.config" />
<add key="owin:appStartup" value="DefaultUmbracoStartup" xdt:Transform="InsertIfMissing" xdt:Locator="Match(key)" />
<add key="owin:appStartup" value="UmbracoDefaultOwinStartup" xdt:Transform="InsertIfMissing" xdt:Locator="Match(key)" />
</appSettings>
<connectionStrings xdt:Transform="Remove" xdt:Locator="Condition(@configSource != '')" />

View File

@@ -51,7 +51,7 @@
<add key="autoFormsAuthentication" value="false" />
<add key="log4net.Config" value="config\log4net.config" />
<add key="owin:appStartup" value="DefaultUmbracoStartup" />
<add key="owin:appStartup" value="UmbracoDefaultOwinStartup" />
</appSettings>
<connectionStrings>
<remove name="umbracoDbDSN" />

View File

@@ -306,7 +306,7 @@
</Compile>
<Compile Include="ApplicationContextExtensions.cs" />
<Compile Include="AreaRegistrationContextExtensions.cs" />
<Compile Include="DefaultUmbracoOwinStartup.cs" />
<Compile Include="UmbracoDefaultOwinStartup.cs" />
<Compile Include="IUmbracoContextAccessor.cs" />
<Compile Include="Models\ContentEditing\Relation.cs" />
<Compile Include="HtmlStringUtilities.cs" />

View File

@@ -5,7 +5,7 @@ using Umbraco.Core.Security;
using Umbraco.Web;
using Umbraco.Web.Security.Identity;
[assembly: OwinStartup("DefaultUmbracoStartup", typeof(DefaultUmbracoOwinStartup))]
[assembly: OwinStartup("UmbracoDefaultOwinStartup", typeof(UmbracoDefaultOwinStartup))]
namespace Umbraco.Web
{
@@ -15,7 +15,7 @@ namespace Umbraco.Web
/// <remarks>
/// The startup type is specified in appSettings under owin:appStartup
/// </remarks>
public class DefaultUmbracoOwinStartup
public class UmbracoDefaultOwinStartup
{
public virtual void Configuration(IAppBuilder app)
{

View File

@@ -30,6 +30,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NuSpecs", "NuSpecs", "{227C
..\build\NuSpecs\UmbracoCms.Core.AllBinaries.nuspec = ..\build\NuSpecs\UmbracoCms.Core.AllBinaries.nuspec
..\build\NuSpecs\UmbracoCms.Core.nuspec = ..\build\NuSpecs\UmbracoCms.Core.nuspec
..\build\NuSpecs\UmbracoCms.Core.Symbols.nuspec = ..\build\NuSpecs\UmbracoCms.Core.Symbols.nuspec
..\build\NuSpecs\UmbracoCms.Identity.nuspec = ..\build\NuSpecs\UmbracoCms.Identity.nuspec
..\build\NuSpecs\UmbracoCms.nuspec = ..\build\NuSpecs\UmbracoCms.nuspec
EndProjectSection
EndProject