Skip to content

Instantly share code, notes, and snippets.

USE master ;
GO
DROP DATABASE xp0_MarketingAutomation, [xp0_Processing.Pools], xp0_ReferenceData, [xp0_Xdb.Collection.Shard0], [xp0_Xdb.Collection.Shard1], [xp0_Xdb.Collection.ShardMapManager], xp0_Core, xp0_ExperienceForms, xp0_Master, xp0_Reporting, xp0_Web
GO
#define parameters
$prefix = "xp0"
$PSScriptRoot = "C:\resourcefiles\"
$XConnectCollectionService = "$prefix.xconnect"
$sitecoreSiteName = "$prefix.sc"
$SolrUrl = "https://localhost:8983/solr"
$SolrRoot = "D:\Shared\software\solr-6.6.1\"
$SolrService = "Solr-6.6.1"
$SqlServer = ".\"
$SqlAdminUser = "sa"
Register-PSRepository -Name SitecoreGallery -SourceLocation https://sitecore.myget.org/F/sc-powershell/api/v2
Install-Module SitecoreInstallFramework
Update-Module SitecoreInstallFramework
sp_configure 'contained database authentication', 1;
GO
RECONFIGURE;
GO
{"PrepareCores": {
// Copies base configs into the core paths.
"Type": "Copy",
"Params": [
{ "Source": "[joinpath(variable('Solr.BaseConfigs'), '*')]", "Destination": "[variable('Core.Root')]" },
{ "Source": "[joinpath(variable('Solr.BaseConfigs'), '*')]", "Destination": "[variable('Rebuild.Root')]" }
]
},
"StartSolr": {
// Starts the Solr service.
<?xml version="1.0" encoding="utf-8"?>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:role="http://www.sitecore.net/xmlconfig/role/">
<sitecore role:require="Standalone or ContentDelivery or ContentManagement">
<settings>
<setting name="FederatedAuthentication.Enabled">
<patch:attribute name="value">true</patch:attribute>
</setting>
</settings>
<!--Property mappings initializer-->
<propertyInitializer type="Sitecore.Owin.Authentication.Services.PropertyInitializer, Sitecore.Owin.Authentication">
<!--List of property mappings
Note that all mappings from the list will be applied to each providers-->
<maps hint="list">
<!--The mapping sets the Email property of the user profile from emailaddress claim-->
<map name="email claim" type="Sitecore.Owin.Authentication.Services.DefaultClaimToPropertyMapper, Sitecore.Owin.Authentication">
<data hint="raw:AddData">
<!--claim name-->
<source name="idp" value="Auth0" />
protected override void ProcessCore(IdentityProvidersArgs args)
{
Assert.ArgumentNotNull(args, "args");
IdentityProvider identityProvider = this.GetIdentityProvider();
string authenticationType = this.GetAuthenticationType();
var provider = new Auth0.Owin.Auth0AuthenticationProvider
{
OnAuthenticated = (context) =>
{
<identityProvider id="Auth0" type="Sitecore.Owin.Authentication.Configuration.DefaultIdentityProvider, Sitecore.Owin.Authentication">
<param desc="name">$(id)</param>
<param desc="domainManager" type="Sitecore.Abstractions.BaseDomainManager" resolve="true" />
<!--This text will be showed for button-->
<caption>Log in with Auth0 - Created by Bas</caption>
<icon>/sitecore/shell/themes/standard/Images/24x24/bas.png</icon>
<!--Domain name which will be added when create a user-->
<domain>sitecore</domain>
<!--list of identity transfromations which are applied to the provider when a user signin-->
<transformations hint="list:AddTransformation">
<identityProvidersPerSites hint="list:AddIdentityProvidersPerSites">
<!--The list of providers assigned to all sites-->
<mapEntry name="all sites" type="Sitecore.Owin.Authentication.Collections.IdentityProvidersPerSitesMapEntry, Sitecore.Owin.Authentication">
<sites hint="list">
<site>shell</site>
<site>login</site>
<site>admin</site>
<site>service</site>
<site>modules_shell</site>
<site>modules_website</site>