UmbBackofficeMembershipProvider 4.1.1
See the version list below for details.
dotnet add package UmbBackofficeMembershipProvider --version 4.1.1
NuGet\Install-Package UmbBackofficeMembershipProvider -Version 4.1.1
<PackageReference Include="UmbBackofficeMembershipProvider" Version="4.1.1" />
paket add UmbBackofficeMembershipProvider --version 4.1.1
#r "nuget: UmbBackofficeMembershipProvider, 4.1.1"
// Install UmbBackofficeMembershipProvider as a Cake Addin #addin nuget:?package=UmbBackofficeMembershipProvider&version=4.1.1 // Install UmbBackofficeMembershipProvider as a Cake Tool #tool nuget:?package=UmbBackofficeMembershipProvider&version=4.1.1
UmbBackofficeMembershipProvider
Code to allow Umbraco 7.7.2+ to use MembershipProvider-based providers for Active Directory authentication.
Users of Umbraco 7.4.2-7.7.1 should use UmbBackofficeMembershipProvider 3.0.0 (NuGet). This version requires API changes and bug fixes present in Umbraco 7.7.2+ to function properly.
What's inside
This project includes a DLL that will allow you to use a traditional MembershipProvider
for logging in Umbraco backoffice users.
System requirements
- NET Framework 4.5
- Umbraco 7.7.2+
NuGet availability
This project is available on NuGet.
Usage instructions
Getting started
- Before making any configuration file changes, make sure that you have an Administrator-level user account in Umbraco with the same username as the Active Directory account that you will use to login to Umbraco. It doesn't matter what you set for the password once UmbBackofficeMembershipProvider is enabled as it will check against Active Directory and not Umbraco for the password.
Installing UmbBackofficeMembershipProvider
Add UmbBackofficeMembershipProvider.dll as a reference in your project or place it in the \bin folder.
In web.config, make the following modifications:
- Add or modify the following line in the
<appSettings>
section:
<add key="owin:appStartup" value="BackofficeMembershipProviderCustomOwinStartup" />
- Add a LDAP connection string to your LDAP server in the
<connectionStrings>
section, like shown in the example code below. Specify a path to the domain root or a container/OU if you want to limit where the user accounts can be located.
<add connectionString="LDAP://mydomain.mycompany.com/DC=mydomain,DC=mycompany,DC=com" name="ADConnectionString" />
Add a membership provider named
BackofficeMembershipProvider
, like shown in the example code below. Be sure theconnectionStringName
matches the LDAP connection string you defined.attributeMapUsername
specifies the username format -sAMAccountName
for just the username, oruserPrincipalName
to use username@mydomain.mycompany.com. Be sure the usernames you configure in Umbraco use the same format.If you are upgrading from a pre-7.3.1 version of Umbraco that used an Active Directory provider for backoffice users, you must change
UsersMembershipProvider
toUmbraco.Web.Security.Providers.UsersMembershipProvider
. If you have a new installation, this is the default provider already.
- Add or modify the following line in the
<membership defaultProvider="UmbracoMembershipProvider">
<providers>
<add
name="BackofficeMembershipProvider"
type="System.Web.Security.ActiveDirectoryMembershipProvider, System.Web, Version=4.0.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
connectionStringName="ADConnectionString"
attributeMapUsername="sAMAccountName"
connectionUsername="testdomain\administrator"
connectionPassword="password"/>
<add
name="UsersMembershipProvider"
type="Umbraco.Web.Security.Providers.UsersMembershipProvider, Umbraco"
minRequiredNonalphanumericCharacters="0" minRequiredPasswordLength="8"
useLegacyEncoding="true" enablePasswordRetrieval="false"
enablePasswordReset="true" requiresQuestionAndAnswer="false"
passwordFormat="Hashed" />
</providers>
</membership>
- In config\UmbracoSettings.config:
- If you are using the default
Umbraco.Web.Security.Providers.UsersMembershipProvider
class forUsersMembershipProvider
, you don't need to do anything.
- If you are using the default
Configure user account creation
This version of UmbBackOfficeMembershipProvider can automatically create Umbraco backoffice user accounts for authenticated users. If you want to enable this functionality, follow these instructions:
- Insert the following
<appSettings>
keys in web.config:<add key="BackOfficeMembershipProvider:CreateAccounts" value="true" />
- set totrue
to enable automatic account creation<add key="BackOfficeMembershipProvider:AccountRoles" value="editor" />
- comma-separated list of groups user should be added to; defaults to editor if key is not present<add key="BackOfficeMembershipProvider:AccountCulture" value="en-US" />
- culture/language to use in creating new account; defaults to value ofumbracoDefaultUILanguage
if key is not present<add key="BackOfficeMembershipProvider:AccountEmailDomain" value="mydomain.com" />
- specifies domain name to be used in setting username@accountemaildomain e-mail address for newly created accounts; ignored if username is already a valid e-mail address, hostname of website is used otherwise if key is not present
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net45 is compatible. net451 was computed. net452 was computed. net46 was computed. net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
-
- ClientDependency (>= 1.9.2)
- log4net (>= 2.0.8)
- Microsoft.AspNet.Mvc (>= 5.2.3)
- Microsoft.Owin (>= 3.1.0)
- Microsoft.Owin.Security (>= 3.1.0)
- Microsoft.Owin.Security.Cookies (>= 3.1.0)
- Microsoft.Owin.Security.OAuth (>= 3.1.0)
- Newtonsoft.Json (>= 10.0.2)
- UmbracoCms.Core (>= 7.7.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Removes unneeded dependencies from 4.1.0.
This version allows the automatic creation of Umbraco backoffice accounts for authenticated users. Umbraco 7.7.2+ required.