Skip to content

Commit

Permalink
Merge pull request #9 from KayeeNL/feature/v10_2_0
Browse files Browse the repository at this point in the history
Feature/v10 2 0
  • Loading branch information
KayeeNL committed Dec 14, 2022
2 parents cf219c5 + 35aca54 commit ae14f9b
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 20 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ _Right click 'Save link as...' since GitHub doesn't respect url encoding, but ma
- [SI-Snitch for Sitecore-10.1.0](./Sitecore%20Packages/SI-Snitch%20for%20Sitecore-10.1.0.zip) ( Sitecore 10.1.0)
- [SI-Snitch for Sitecore-10.1.1](./Sitecore%20Packages/SI-Snitch%20for%20Sitecore-10.1.1.zip) ( Sitecore 10.1.1)
- [SI-Snitch for Sitecore-10.1.2](./Sitecore%20Packages/SI-Snitch%20for%20Sitecore-10.1.2.zip) ( Sitecore 10.1.2)
- [SI-Snitch for Sitecore-10.2](./Sitecore%20Packages/SI-Snitch%20for%20Sitecore-10.2.zip) ( Sitecore 10.2)

The above package can be installed through the normal Sitecore Installation Wizard.

Expand All @@ -43,7 +44,7 @@ The following would be an output of SI Snitch in the Sitecore log file:

- 32856 09:01:15 INFO oO SI Snitch Oo -- Claim: nbf || Value: 1604563275
- 32856 09:01:15 INFO oO SI Snitch Oo -- Claim: exp || Value: 1604564775
- 32856 09:01:15 INFO oO SI Snitch Oo -- Claim: iss || Value: https://sc10_1_2.identityserver.dev.local
- 32856 09:01:15 INFO oO SI Snitch Oo -- Claim: iss || Value: https://sc10_2_0.identityserver.dev.local
- 32856 09:01:15 INFO oO SI Snitch Oo -- Claim: aud || Value: Sitecore
- 32856 09:01:15 INFO oO SI Snitch Oo -- Claim: iat || Value: 1604563275

Expand All @@ -63,6 +64,6 @@ _Originally developed by:_

Derek Correia - Twitter: [@derekc](https://twitter.com/derekc), GitHub: https://github.com/derekcorreia

_Upgraded + tested to support Sitecore 9.3, Sitecore 10.0.0, Sitecore 10.0.1, Sitecore 10.1.0 , Sitecore 10.1.1 & Sitecore 10.1.2_
_Upgraded + tested to support Sitecore 9.3, Sitecore 10.0.0, Sitecore 10.0.1, Sitecore 10.1.0 , Sitecore 10.1.1, Sitecore 10.1.2, Sitecore 10.2_

Robbert Hock - Twitter: [@kayeeNL](https://twitter.com/kayeenl), GitHub: https://github.com/KayeeNL
Binary file added Sitecore Packages/SI-Snitch for Sitecore-10.2.zip
Binary file not shown.
2 changes: 1 addition & 1 deletion Sitecore Packages/SI-Snitch for Sitecore.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<metadata>
<PackageName>SI-Snitch for Sitecore</PackageName>
<Author>Derek Correia &amp; Robbert Hock</Author>
<Version>10.1.2</Version>
<Version>10.2</Version>
<Revision />
<License />
<Comment />
Expand Down
17 changes: 6 additions & 11 deletions SitecoreServices.SISnitch/SISnitch.cs
Original file line number Diff line number Diff line change
@@ -1,28 +1,23 @@
using System;
using System.Security.Claims;
using Sitecore.Owin.Authentication.Services;
using System.Security.Claims;
using Sitecore.Abstractions;
using Sitecore.Diagnostics;
using Sitecore.Owin.Authentication.Services;

namespace SitecoreServices.SISnitch
{
public class Snitch : Transformation
{

public Snitch(BaseLog log)
{
Assert.ArgumentNotNull(log, "log");
Log = log;
}

protected BaseLog Log { get; }

public override void Transform(ClaimsIdentity identity, TransformationContext context)
{
foreach (Claim c in identity.Claims)
{
Log.Info(String.Format("oO SI Snitch Oo -- Claim: {0} || Value: {1}", c.Type, c.Value), this);
}
foreach (var c in identity.Claims) Log.Info($"oO SI Snitch Oo -- Claim: {c.Type} || Value: {c.Value}", this);
}

protected BaseLog Log { get; }
}
}
}
18 changes: 14 additions & 4 deletions SitecoreServices.SISnitch/SitecoreServices.SISnitch.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -39,27 +39,37 @@
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Reference Include="Sitecore.Kernel, Version=16.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Sitecore.Kernel.10.1.2\lib\net48\Sitecore.Kernel.dll</HintPath>
<Reference Include="Sitecore.Kernel, Version=17.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Sitecore.Kernel.10.2.0\lib\net48\Sitecore.Kernel.dll</HintPath>
</Reference>
<Reference Include="Sitecore.Owin.Authentication, Version=6.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Sitecore.Owin.Authentication.10.1.2\lib\net48\Sitecore.Owin.Authentication.dll</HintPath>
<Reference Include="Sitecore.Owin.Authentication, Version=7.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Sitecore.Owin.Authentication.10.2.0\lib\net48\Sitecore.Owin.Authentication.dll</HintPath>
</Reference>
<Reference Include="sysglobl" />
<Reference Include="System" />
<Reference Include="System.configuration" />
<Reference Include="System.Data" />
<Reference Include="System.Design" />
<Reference Include="System.DirectoryServices" />
<Reference Include="System.Drawing" />
<Reference Include="System.IO.Compression" />
<Reference Include="System.IO.Compression.FileSystem" />
<Reference Include="System.Linq" />
<Reference Include="System.Runtime" />
<Reference Include="System.Runtime.Caching" />
<Reference Include="System.Runtime.InteropServices" />
<Reference Include="System.Runtime.InteropServices.RuntimeInformation" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.Security" />
<Reference Include="System.ServiceModel" />
<Reference Include="System.ServiceModel.Web" />
<Reference Include="System.Threading.Thread" />
<Reference Include="System.Web" />
<Reference Include="System.Web.ApplicationServices" />
<Reference Include="System.Web.Extensions" />
<Reference Include="System.Web.Services" />
<Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
4 changes: 2 additions & 2 deletions SitecoreServices.SISnitch/packages.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Sitecore.Kernel" version="10.1.2" targetFramework="net48" />
<package id="Sitecore.Owin.Authentication" version="10.1.2" targetFramework="net48" />
<package id="Sitecore.Kernel" version="10.2.0" targetFramework="net48" />
<package id="Sitecore.Owin.Authentication" version="10.2.0" targetFramework="net48" />
</packages>

0 comments on commit ae14f9b

Please sign in to comment.