Skip to content
Permalink
Browse files

UmbracoIdentity on version 7.3 #29

upgrades to umb 7.3.4, bumps version, updates nuspec, creates better umbraco owin startup code experience, ensures that front-end cookies are only read when required.
  • Loading branch information...
Shazwazza committed Dec 14, 2015
1 parent 3f9c688 commit 8e219291f2860f968b60ec038b3e9c8681c31e47
@@ -174,3 +174,5 @@ src/UmbracoIdentity.Web/Umbraco_Client/*
src/UmbracoIdentity.Web/Xslt/Web.config
src/UmbracoIdentity.Web/App_Browsers/*
src/UmbracoIdentity.Web/MacroScripts/Web.config
src/UmbracoIdentity.Web/App_Data/cache/*
src/UmbracoIdentity.Web/Views/Partials/Grid/*
@@ -14,14 +14,7 @@
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<dependencies>

<dependency id="UmbracoCms.Core" version="7.2.4" />
<dependency id="Microsoft.Owin" version="3.0.1" />
<dependency id="Microsoft.Owin.Security" version="3.0.1" />
<dependency id="Microsoft.Owin.Security.Cookies" version="3.0.1" />
<dependency id="Microsoft.Owin.Security.OAuth" version="3.0.1" />
<dependency id="Microsoft.Owin.Host.SystemWeb" version="2.1.0" />
<dependency id="Microsoft.AspNet.Identity.Core" version="2.2.0" />
<dependency id="Microsoft.AspNet.Identity.Owin" version="2.2.0" />
<dependency id="UmbracoCms.Core" version="7.3.4" />

</dependencies>
</metadata>
@@ -7,6 +7,6 @@
[assembly: AssemblyCulture("")]


[assembly: AssemblyVersion("2.0.1")]
[assembly: AssemblyFileVersion("2.0.1")]
[assembly: AssemblyInformationalVersion("2.0.1")]
[assembly: AssemblyVersion("3.0.0")]
[assembly: AssemblyFileVersion("3.0.0")]
[assembly: AssemblyInformationalVersion("3.0.0")]
@@ -10,31 +10,31 @@
using UmbracoIdentity.Web.Models.UmbracoIdentity;
using UmbracoIdentity.Web;
using Owin;
using Umbraco.Web;

[assembly: OwinStartup(typeof(UmbracoIdentityStartup))]
[assembly: OwinStartup("UmbracoIdentityStartup", typeof(UmbracoIdentityStartup))]

namespace UmbracoIdentity.Web
{

/// <summary>
/// OWIN Startup class for UmbracoIdentity
/// </summary>
public class UmbracoIdentityStartup
public class UmbracoIdentityStartup : UmbracoDefaultOwinStartup
{

public void Configuration(IAppBuilder app)
public override void Configuration(IAppBuilder app)
{
base.Configuration(app);

//Single method to configure the Identity user manager for use with Umbraco
app.ConfigureUserManagerForUmbracoMembers<UmbracoApplicationMember>();

// Enable the application to use a cookie to store information for the
// signed in user and to use a cookie to temporarily store information
// about a user logging in with a third party login provider
// Configure the sign in cookie
app.UseCookieAuthentication(new CookieAuthenticationOptions
app.UseCookieAuthentication(new FrontEndCookieAuthenticationOptions
{
AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,

Provider = new CookieAuthenticationProvider
{
// Enables the application to validate the security stamp when the user
@@ -47,11 +47,7 @@ public void Configuration(IAppBuilder app)
UmbracoIdentity.IdentityExtensions.GetUserId<int>)
}
});

//Ensure owin is configured for Umbraco back office authentication - this must
// be configured AFTER the standard UseCookieConfiguration above.
app.UseUmbracoBackAuthentication();


app.UseExternalSignInCookie(DefaultAuthenticationTypes.ExternalCookie);

// Uncomment the following lines to enable logging in with third party login providers
@@ -1,15 +1,23 @@
<?xml version="1.0"?>
<configuration>

<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
<section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
<sectionGroup name="system.web.webPages.razor" type="System.Web.WebPages.Razor.Configuration.RazorWebSectionGroup, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<section name="host" type="System.Web.WebPages.Razor.Configuration.HostSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
<section name="pages" type="System.Web.WebPages.Razor.Configuration.RazorPagesSection, System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" />
</sectionGroup>
</configSections>
</configSections>







<system.web.webPages.razor>
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />



<system.web.webPages.razor>
<host factoryType="System.Web.Mvc.MvcWebRazorHostFactory, System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<pages pageBaseType="System.Web.Mvc.WebViewPage">
<namespaces>
<add namespace="System.Web.Mvc" />
@@ -24,15 +32,11 @@
<add namespace="Examine" />
</namespaces>
</pages>
</system.web.webPages.razor>

<appSettings>
</system.web.webPages.razor><appSettings>
<add key="webpages:Enabled" value="false" />
</appSettings>

<system.web>
</appSettings><system.web>
<httpHandlers>
<add path="*" verb="*" type="System.Web.HttpNotFoundHandler"/>
<add path="*" verb="*" type="System.Web.HttpNotFoundHandler" />
</httpHandlers>

<!--
@@ -42,23 +46,16 @@
To change this behavior apply the ValidateInputAttribute to a
controller or action.
-->
<pages
validateRequest="false"
pageParserFilterType="System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
pageBaseType="System.Web.Mvc.ViewPage, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
userControlBaseType="System.Web.Mvc.ViewUserControl, System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<pages validateRequest="false" pageParserFilterType="System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" pageBaseType="System.Web.Mvc.ViewPage, System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" userControlBaseType="System.Web.Mvc.ViewUserControl, System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<controls>
<add assembly="System.Web.Mvc, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" namespace="System.Web.Mvc" tagPrefix="mvc" />
<add assembly="System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" namespace="System.Web.Mvc" tagPrefix="mvc" />
</controls>
</pages>
</system.web>

<system.webServer>
</system.web><system.webServer>
<validation validateIntegratedModeConfiguration="false" />

<handlers>
<remove name="BlockViewHandler"/>
<remove name="BlockViewHandler" />
<add name="BlockViewHandler" path="*" verb="*" preCondition="integratedMode" type="System.Web.HttpNotFoundHandler" />
</handlers>
</system.webServer>
</configuration>
</system.webServer></configuration>
Oops, something went wrong.

0 comments on commit 8e21929

Please sign in to comment.
You can’t perform that action at this time.