From a4563fed93803d9c4ce5232980b998bc5445d6f1 Mon Sep 17 00:00:00 2001 From: Robbert Hock Date: Wed, 14 Dec 2022 09:50:57 +0100 Subject: [PATCH 1/2] Upgrade SitecoreServices.SISnitch to Sitecore 10.2.0 --- SitecoreServices.SISnitch/SISnitch.cs | 17 ++++++----------- .../SitecoreServices.SISnitch.csproj | 18 ++++++++++++++---- SitecoreServices.SISnitch/packages.config | 4 ++-- 3 files changed, 22 insertions(+), 17 deletions(-) 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 4d0bf37..b3d0c8c 100644 --- a/SitecoreServices.SISnitch/SitecoreServices.SISnitch.csproj +++ b/SitecoreServices.SISnitch/SitecoreServices.SISnitch.csproj @@ -39,15 +39,19 @@ - - ..\packages\Sitecore.Kernel.10.1.1\lib\net48\Sitecore.Kernel.dll + + ..\packages\Sitecore.Kernel.10.2.0\lib\net48\Sitecore.Kernel.dll - - ..\packages\Sitecore.Owin.Authentication.10.1.1\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 c999e15..a2e4dbb 100644 --- a/SitecoreServices.SISnitch/packages.config +++ b/SitecoreServices.SISnitch/packages.config @@ -1,5 +1,5 @@  - - + + \ No newline at end of file From 35aca546d5285c9a4ef3956776b4b6c461025f76 Mon Sep 17 00:00:00 2001 From: Robbert Hock Date: Wed, 14 Dec 2022 10:22:44 +0100 Subject: [PATCH 2/2] Upgrade SitecoreServices.SISnitch to Sitecore 10.2.0 -> Updated readme + added SI-Snitch for Sitecore-10.2.zip package --- README.md | 5 +++-- .../SI-Snitch for Sitecore-10.2.zip | Bin 0 -> 3981 bytes Sitecore Packages/SI-Snitch for Sitecore.xml | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 Sitecore Packages/SI-Snitch for Sitecore-10.2.zip 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 0000000000000000000000000000000000000000..f3e154ed996cebf4fcb859be8f2f051932cce1ae GIT binary patch literal 3981 zcmV;84|4EOO9KQH000080G(2fRTY3>@)ZvN096$L01E&B0B~VrYhh<)E_!KjtXO$C z6kgjNYsi`@F)0j^ZDM36Yj)ZFkYS9$Fbgwdi^v+4t!!l}QP#-5WFM8XGzcMEWD60M zC4Bn5@B8(o^7Vc1d(ZX!aps!)KF>MNxt=-qG18-=1_A&8IzXC9w7FI^I~()vh$5XuHY7|xJ#C2;iLtYi_x^8-x!}&j%Ub~5qjExU z$4B~RAt~2(6!HdYSmjL72Ann9wbOOt;Sm$%a3%_}$zl~7lDaK#qprlMh~<%Vl%Sh6 z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000000000 n0001RVPk7yXJsyWX>d?W1qJ{B000310RTAw002G@00000z+t@~ literal 0 HcmV?d00001 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