Skip to content

Commit

Permalink
Upgrade SitecoreServices.SISnitch to Sitecore 10.3 -> Added the 10.3 …
Browse files Browse the repository at this point in the history
…package + updated readme + added some asserts in code
  • Loading branch information
KayeeNL committed Dec 15, 2022
1 parent ecc6cea commit ffaf17d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ _Right click 'Save link as...' since GitHub doesn't respect url encoding, but ma
- [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)
- [SI-Snitch for Sitecore-10.3](./Sitecore%20Packages/SI-Snitch%20for%20Sitecore-10.3.zip) ( Sitecore 10.3)

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

Expand All @@ -44,7 +45,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_2_0.identityserver.dev.local
- 32856 09:01:15 INFO oO SI Snitch Oo -- Claim: iss || Value: https://sc10_3.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 @@ -64,6 +65,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, Sitecore 10.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 & Sitecore 10.3_

Robbert Hock - Twitter: [@kayeeNL](https://twitter.com/kayeenl), GitHub: https://github.com/KayeeNL
Binary file added Sitecore Packages/SI-Snitch for Sitecore-10.3.zip
Binary file not shown.
5 changes: 4 additions & 1 deletion SitecoreServices.SISnitch/SISnitch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,17 @@ public class Snitch : Transformation
{
public Snitch(BaseLog log)
{
Assert.ArgumentNotNull(log, "log");
Assert.ArgumentNotNull(log, nameof(log));
Log = log;
}

protected BaseLog Log { get; }

public override void Transform(ClaimsIdentity identity, TransformationContext context)
{
Assert.ArgumentNotNull(identity, nameof(identity));
Assert.ArgumentNotNull(context, nameof(context));

foreach (var c in identity.Claims) Log.Info($"oO SI Snitch Oo -- Claim: {c.Type} || Value: {c.Value}", this);
}
}
Expand Down

0 comments on commit ffaf17d

Please sign in to comment.