Skip to content

Instantly share code, notes, and snippets.

@chrsin
Last active April 24, 2019 08:16
Show Gist options
  • Save chrsin/479e042bba1ce6f7ee86c52226ccc60d to your computer and use it in GitHub Desktop.
Save chrsin/479e042bba1ce6f7ee86c52226ccc60d to your computer and use it in GitHub Desktop.
<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">
<patch:attribute name="value">20</patch:attribute>
</setting>
</settings>
<api>
<tokenSecurity>
<signingProvider type="Sitecore.Services.Infrastructure.Sitecore.Security.SymetricKeySigningProvider, Sitecore.Services.Infrastructure.Sitecore">
<param desc="connectionStringName">Sitecore.Services.Token.SecurityKey</param>
</signingProvider>
</tokenSecurity>
</api>
<pipelines>
<httpRequestBegin>
<processor type="MyWebsite.TokenAuthUserResolver, MyWebsite" resolve="true" patch:after="processor[@type='Sitecore.Pipelines.HttpRequest.UserResolver, Sitecore.Kernel']"/>
</httpRequestBegin>
</pipelines>
</sitecore>
</configuration>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment