Umbraco Custom Section
This repository is a combination of various other sites and forum posts about creating a custom Umbraco section. The aim is to have working example code accompanied by some extra documentation about a custom section. This custom section will contain the following features:
- Custom tree and pages
- AzureAD / ADFS
- Two factor authentication
It has been developed for and tested on Umbraco 7.7 - 7.10.
1. How to install
The root of this repository is the App_Plugins folder of a default install of Umbraco. So to start, do the following:
- Create empty ASP.NET (.NET Framework) project.
- Add UmbracoCms nuget package.
- Clone this repository into the App_Plugins folder. Let ModelsBuilder be. Include all the files from this repository into your Umbraco-csproj.
- Add the following nuget packages:
- ExpressMapper
- Microsoft.EntityFrameworkCore
- Microsoft.EntityFrameworkCore.InMemory
- Microsoft.EntityFrameworkCore.Relational
- Autofac
- Autofac.Mvc5
- Autofac.WebApi2
- TwoFactorAuthNet
- Microsoft.Owin.Security.WsFederation (3.1.0)
- Build.
- Add the project as a new website in IIS.
- Run the installer and setup Umbraco.
- Update
web.config
for these features:
2. Use of example code
Although it is perfectly fine to use every bit of example code shown in this repository, please keep in mind that most examples are for demonstrating how to use a feature of Umbraco, and do not really showcase good application design. They are simple too basic and simplistic for that.
3. Table of contents
- Basics
- Custom Tree
- Search
- Dependency Injection
- Custom pages
- Multiple sections
- Basic two factor authentication
- Azure AD / ADFS
4. Sources used
Umbraco icons
Custom section
- http://skrift.io/articles/archive/sections-and-trees-in-umbraco-7/
- http://www.enkelmedia.se/blogg/2013/11/22/creating-custom-sections-in-umbraco-7-part-1.aspx
- https://github.com/kgiszewski/LearnUmbraco7/tree/master/Chapter%2016%20-%20Custom%20Sections%2C%20Trees%20and%20Actions
2FA login flow
ADFS
- https://24days.in/umbraco-cms/2016/authenticating-with-ad-fs-and-identityextensions/
- https://our.umbraco.org/documentation/Reference/Security/
- https://our.umbraco.org/forum/extending-umbraco-and-using-the-api/79201-account-auto-linking-not-working-with-owin-ad-fsws-federation-authentication
- https://github.com/umbraco/Umbraco-CMS/tree/release-7.7.6
- https://chris.59north.com/post/Manually-configuring-OWIN-WS-Federation-middleware-and-accepting-encrypted-tokens
- https://chris.59north.com/post/Configuring-an-ASPNET-site-to-use-WS-Federation
5. Contributing
If you see something incorrect, please submit a pull request and I will have it fixed.
Last update: 2018-04-02