ToolUp.ShareTokenStoreDecorators.RevokeOnIssuerRemoved 0.22.0

Prefix Reserved
dotnet add package ToolUp.ShareTokenStoreDecorators.RevokeOnIssuerRemoved --version 0.22.0
                    
NuGet\Install-Package ToolUp.ShareTokenStoreDecorators.RevokeOnIssuerRemoved -Version 0.22.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ToolUp.ShareTokenStoreDecorators.RevokeOnIssuerRemoved" Version="0.22.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ToolUp.ShareTokenStoreDecorators.RevokeOnIssuerRemoved" Version="0.22.0" />
                    
Directory.Packages.props
<PackageReference Include="ToolUp.ShareTokenStoreDecorators.RevokeOnIssuerRemoved" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ToolUp.ShareTokenStoreDecorators.RevokeOnIssuerRemoved --version 0.22.0
                    
#r "nuget: ToolUp.ShareTokenStoreDecorators.RevokeOnIssuerRemoved, 0.22.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package ToolUp.ShareTokenStoreDecorators.RevokeOnIssuerRemoved@0.22.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ToolUp.ShareTokenStoreDecorators.RevokeOnIssuerRemoved&version=0.22.0
                    
Install as a Cake Addin
#tool nuget:?package=ToolUp.ShareTokenStoreDecorators.RevokeOnIssuerRemoved&version=0.22.0
                    
Install as a Cake Tool

ToolUp.ShareTokenStoreDecorators.RevokeOnIssuerRemoved

An IShareTokenStore decorator that revokes a departed team member's outstanding share-tokens. When a member is removed from a team, any share-link they minted while a member stops granting access.

How it works

The decorator wraps the resolved IShareTokenStore and subscribes to MembershipChanged notifications on the reserved _platform topic. On a MembershipChanged.Removed event it:

  1. Enumerates the leaver's outstanding claims via IShareTokenStore.ListByIssuer(teamId, affectedUserId).
  2. Revokes each still-active claim with actor = "system:RevokeOnIssuerRemoved".

All other IShareTokenStore methods delegate to the inner store unchanged.

Wiring

open ToolUp.ShareTokenStoreDecorators

app
|> ServerApp.withShareTokenStoreDecorator
    (RevokeOnIssuerRemoved.decorator notifications (Some logger))

The deployment must wire an IShareTokenStore (a ClaimBearer surface auto-promotes the default BlobShareTokenStore) and a Team surface; SurfaceCoherenceValidator warns at startup if the decorator is wired without either.

Idempotency

Revocation is idempotent. IShareTokenStore.Revoke is itself idempotent (re-revoking returns Ok), and the handler skips already-revoked claims, so a duplicate or out-of-order Removed delivery cannot over-revoke or resurrect a token — matching the at-least-once, no-cross-publisher- ordering INotificationChannel contract.

Audit

The decorator carries no IAuditLog dependency. The actor string it passes to Revoke flows into the ShareTokenRevoked audit event emitted by the underlying store (the default BlobShareTokenStore), so the revocation trail attributes to system:RevokeOnIssuerRemoved.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.22.0 90 8/27/2026
0.21.0 100 8/26/2026
0.20.1 111 8/20/2026
0.20.0 119 8/19/2026