This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Security.Claims; | |
using System.Web.Http; | |
using Sitecore.Services.Core.Security; | |
using Sitecore.Services.Infrastructure.Web.Http.Security; | |
namespace MyWebsite | |
{ | |
[RoutePrefix("_api/TAuth")] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Diagnostics.CodeAnalysis; | |
using System.Web.Http; | |
using Sitecore.Pipelines; | |
namespace MyWebsite | |
{ | |
[ExcludeFromCodeCoverage] | |
public class CustomMvcRoutes | |
{ | |
public void Process(PipelineArgs args) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Diagnostics.CodeAnalysis; | |
using System.Linq; | |
using System.Security.Claims; | |
using System.Text.RegularExpressions; | |
using Sitecore; | |
using Sitecore.Pipelines.HttpRequest; | |
using Sitecore.Security.Authentication; | |
using Sitecore.Services.Infrastructure.Web.Http.Security; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"> | |
<sitecore> | |
<pipelines> | |
<initialize> | |
<processor type="MyWebsite.WebApiSetup, MyWebsite" patch:after="processor[@type='Sitecore.Pipelines.Loader.EnsureAnonymousUsers, Sitecore.Kernel']" /> | |
</initialize> | |
</pipelines> | |
</sitecore> | |
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"> | |
<sitecore> | |
<settings> | |
<setting name="Sitecore.Services.Token.Authorization.Enabled"> | |
<patch:attribute name="value">true</patch:attribute> | |
</setting> | |
<setting name="Sitecore.Services.SecurityPolicy"> | |
<patch:attribute name="value">Sitecore.Services.Infrastructure.Web.Http.Security.ServicesOnPolicy, Sitecore.Services.Infrastructure</patch:attribute> | |
</setting> | |
<setting name="Sitecore.Services.Token.Authorization.Timeout"> |