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
<PackageReference Include="ToolUp.ShareTokenStoreDecorators.RevokeOnIssuerRemoved" Version="0.22.0" />
<PackageVersion Include="ToolUp.ShareTokenStoreDecorators.RevokeOnIssuerRemoved" Version="0.22.0" />
<PackageReference Include="ToolUp.ShareTokenStoreDecorators.RevokeOnIssuerRemoved" />
paket add ToolUp.ShareTokenStoreDecorators.RevokeOnIssuerRemoved --version 0.22.0
#r "nuget: ToolUp.ShareTokenStoreDecorators.RevokeOnIssuerRemoved, 0.22.0"
#:package ToolUp.ShareTokenStoreDecorators.RevokeOnIssuerRemoved@0.22.0
#addin nuget:?package=ToolUp.ShareTokenStoreDecorators.RevokeOnIssuerRemoved&version=0.22.0
#tool nuget:?package=ToolUp.ShareTokenStoreDecorators.RevokeOnIssuerRemoved&version=0.22.0
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:
- Enumerates the leaver's outstanding claims via
IShareTokenStore.ListByIssuer(teamId, affectedUserId). - 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 | Versions 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. |
-
net10.0
- ToolUp.Platform.Core (>= 0.22.0)
- ToolUp.Platform.Server (>= 0.22.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.