diff --git a/README.md b/README.md index 510765e..ef2c5f2 100644 --- a/README.md +++ b/README.md @@ -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. @@ -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 @@ -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 diff --git a/Sitecore Packages/SI-Snitch for Sitecore-10.2.zip b/Sitecore Packages/SI-Snitch for Sitecore-10.2.zip new file mode 100644 index 0000000..f3e154e Binary files /dev/null and b/Sitecore Packages/SI-Snitch for Sitecore-10.2.zip differ diff --git a/Sitecore Packages/SI-Snitch for Sitecore.xml b/Sitecore Packages/SI-Snitch for Sitecore.xml index 3985bc6..09b6472 100644 --- a/Sitecore Packages/SI-Snitch for Sitecore.xml +++ b/Sitecore Packages/SI-Snitch for Sitecore.xml @@ -3,7 +3,7 @@ SI-Snitch for Sitecore Derek Correia & Robbert Hock - 10.1.2 + 10.2 diff --git a/SitecoreServices.SISnitch/SISnitch.cs b/SitecoreServices.SISnitch/SISnitch.cs index 7fcdddf..52d33d8 100644 --- a/SitecoreServices.SISnitch/SISnitch.cs +++ b/SitecoreServices.SISnitch/SISnitch.cs @@ -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; } } -} +} \ No newline at end of file diff --git a/SitecoreServices.SISnitch/SitecoreServices.SISnitch.csproj b/SitecoreServices.SISnitch/SitecoreServices.SISnitch.csproj index f5ca1f4..b3d0c8c 100644 --- a/SitecoreServices.SISnitch/SitecoreServices.SISnitch.csproj +++ b/SitecoreServices.SISnitch/SitecoreServices.SISnitch.csproj @@ -39,15 +39,19 @@ - - ..\packages\Sitecore.Kernel.10.1.2\lib\net48\Sitecore.Kernel.dll + + ..\packages\Sitecore.Kernel.10.2.0\lib\net48\Sitecore.Kernel.dll - - ..\packages\Sitecore.Owin.Authentication.10.1.2\lib\net48\Sitecore.Owin.Authentication.dll + + ..\packages\Sitecore.Owin.Authentication.10.2.0\lib\net48\Sitecore.Owin.Authentication.dll + + + + @@ -55,11 +59,17 @@ + + + + + + \ No newline at end of file diff --git a/SitecoreServices.SISnitch/packages.config b/SitecoreServices.SISnitch/packages.config index 0bab3f4..a2e4dbb 100644 --- a/SitecoreServices.SISnitch/packages.config +++ b/SitecoreServices.SISnitch/packages.config @@ -1,5 +1,5 @@  - - + + \ No newline at end of file