Tharga.Team
3.1.7
dotnet add package Tharga.Team --version 3.1.7
NuGet\Install-Package Tharga.Team -Version 3.1.7
<PackageReference Include="Tharga.Team" Version="3.1.7" />
<PackageVersion Include="Tharga.Team" Version="3.1.7" />
<PackageReference Include="Tharga.Team" />
paket add Tharga.Team --version 3.1.7
#r "nuget: Tharga.Team, 3.1.7"
#:package Tharga.Team@3.1.7
#addin nuget:?package=Tharga.Team&version=3.1.7
#tool nuget:?package=Tharga.Team&version=3.1.7
Tharga Team
Domain models, service abstractions, and authorization primitives for multi-tenant Blazor applications. This package has no server-side dependencies and works with both Blazor Server and Blazor WebAssembly.
What's included
Team and user models
ITeam/ITeam<TMember>- Team aggregate with members.ITeamMember- Team member withAccessLevel, invitation state, tenant roles, and scope overrides.IUser- User identity.Invitation,InviteUserModel,MembershipState.
Service interfaces
ITeamService- Team CRUD, member management, invitations. IncludesGetMembersAsync(teamKey)returningIAsyncEnumerable<ITeamMember>for consumers that need to enumerate members without knowing the per-consumerTMembertype.ITeamManagementService- Scope-enforced mutations (create, rename, delete, invite, etc.).IUserService- Current user resolution.IApiKeyAdministrationService/IApiKeyManagementService- API key management.IApiKeyLifecycleHandler- Opt-in hook receiving an API key's private token on create/recycle (and a tokenless delete signal) viaApiKeyLifecycleContext/ApiKeyLifecycleReason. Registered throughThargaPlatformOptions.AddApiKeyLifecycleHandler<T>().
Authorization
AccessLevelenum - Owner, Administrator, User, Viewer, Custom.Customgrants no inherited base scopes (effective scopes = roles ∪ scope overrides only) for least-privilege keys/members.Tagrecord - System-set key-value tag on an API key (a list, so a key may repeat). Set at creation only; surfaced as atag.{Key}claim on the authenticated principal.TeamClaimTypes- Claim type constants (TeamKey,AccessLevel,Scope,TagPrefix).IScopeRegistry/ScopeRegistry- Register and resolve scopes per access level.ITenantRoleRegistry/TenantRoleRegistry- Register code roles (global, fixed at deploy time) with associated scopes.ITenantRoleService/TenantRoleService- Team-aware role resolution: merges code roles with a team's runtime-defined custom roles and unions their scopes for a member of a given team. Registered byAddThargaDynamicTenantRoles()(wired wheno.EnableDynamicRoles = true); custom roles are created/edited per team viaITeamService.SetTeamCustomRolesAsync, with scopes constrained to app-registered scopes. The scope required to manage custom roles is configurable viaAddThargaDynamicTenantRoles(o => o.ManageScope = "…")(defaultteam:manage).ITenantRoleVisibilityProvider- Optional per-team hook that decides whether a tenant role is offered in the role editor. Default (AllRolesVisibleTenantRoleVisibilityProvider) shows every role; register your own to hide feature-gated roles from teams where the feature is disabled. Hiding a role never prunes existing assignments and does not affect scope resolution.RequireAccessLevelAttribute/RequireScopeAttribute- Declarative authorization on service methods.TeamScopes/ApiKeyScopes/AuditScopes- Built-in scope constants (audit:readgates the audit log).ISystemScopeRegistry/ISystemRoleRegistry- Global (system) scopes for system API keys, and a mapping of app/global roles (e.g.Developer) to those scopes for privileged users. Configured viao.ConfigureSystemScopes/o.ConfigureSystemRoles.
Base classes
TeamServiceBase- Implement your own team service backend.UserServiceBase- Implement your own user service backend.
Related packages
| Package | Description |
|---|---|
| Tharga.Team.Blazor | Team management Blazor UI components, authentication |
| Tharga.Team.MongoDB | MongoDB persistence for teams and users |
| Tharga.Team.Service | Server-side API key auth, Swagger, audit logging |
| Tharga.Blazor | Generic Blazor UI components (buttons, breadcrumbs, etc.) |
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. 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
- Microsoft.AspNetCore.Components.Authorization (>= 10.0.9)
- Microsoft.Extensions.DependencyInjection (>= 10.0.9)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.9)
- Tharga.Toolkit (>= 1.15.25)
-
net9.0
- Microsoft.AspNetCore.Components.Authorization (>= 9.0.17)
- Microsoft.Extensions.DependencyInjection (>= 10.0.9)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.9)
- Tharga.Toolkit (>= 1.15.25)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on Tharga.Team:
| Package | Downloads |
|---|---|
|
Tharga.Team.Service
Server-side API-key authentication, authorization enforcement, controller registration, OpenAPI/Swagger setup, and audit logging for ASP.NET Core projects. |
|
|
Tharga.Team.MongoDB
MontoDB Team features for Tharga Blazor. |
|
|
Tharga.Team.Blazor
Team management Blazor components for multi-tenant applications. Works with both Blazor Server and WebAssembly. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 3.1.7 | 157 | 7/7/2026 |
| 3.1.6 | 155 | 7/5/2026 |
| 3.1.5 | 158 | 7/5/2026 |
| 3.1.4 | 176 | 7/1/2026 |
| 3.1.3 | 181 | 6/26/2026 |
| 3.1.2 | 185 | 6/23/2026 |
| 3.1.1 | 171 | 6/21/2026 |
| 3.1.0 | 177 | 6/20/2026 |
| 3.0.5 | 162 | 6/20/2026 |
| 3.0.4 | 172 | 6/14/2026 |
| 3.0.3 | 176 | 6/11/2026 |
| 3.0.2 | 181 | 6/4/2026 |
| 3.0.1 | 187 | 6/2/2026 |
| 3.0.0 | 173 | 6/2/2026 |
| 2.1.3 | 166 | 5/30/2026 |
| 2.1.2 | 166 | 5/29/2026 |
| 2.1.1 | 173 | 5/26/2026 |
| 2.1.0 | 173 | 5/18/2026 |
| 2.0.18 | 235 | 5/11/2026 |
| 2.0.17 | 185 | 5/10/2026 |