Brixa.Identity.Contracts
1.0.0
dotnet add package Brixa.Identity.Contracts --version 1.0.0
NuGet\Install-Package Brixa.Identity.Contracts -Version 1.0.0
<PackageReference Include="Brixa.Identity.Contracts" Version="1.0.0" />
<PackageVersion Include="Brixa.Identity.Contracts" Version="1.0.0" />
<PackageReference Include="Brixa.Identity.Contracts" />
paket add Brixa.Identity.Contracts --version 1.0.0
#r "nuget: Brixa.Identity.Contracts, 1.0.0"
#:package Brixa.Identity.Contracts@1.0.0
#addin nuget:?package=Brixa.Identity.Contracts&version=1.0.0
#tool nuget:?package=Brixa.Identity.Contracts&version=1.0.0
Brixa.Identity.Contracts
Shared DTOs, constants, enums, and event contracts used across all Brixa.Identity packages.
Install
dotnet add package Brixa.Identity.Contracts
This package is automatically included when you install any other Brixa.Identity package.
Constants
IdentityClaims
JWT claim keys — these are wire-format contracts and should not be changed:
IdentityClaims.UserId // "user_id"
IdentityClaims.Username // "username"
IdentityClaims.Email // "email"
IdentityClaims.Role // "role"
IdentityClaims.Permissions // "permissions"
IdentityClaims.MerchantReference // "merchant_reference"
IdentityClaims.TenantId // "tenant_id"
IdentityErrorCodes
Machine-readable error codes returned by the Identity Service:
IdentityErrorCodes.InvalidCredentials // "IDENTITY_INVALID_CREDENTIALS"
IdentityErrorCodes.AccountLocked // "IDENTITY_ACCOUNT_LOCKED"
IdentityErrorCodes.UserNotFound // "IDENTITY_USER_NOT_FOUND"
IdentityErrorCodes.RefreshTokenReused // "IDENTITY_REFRESH_TOKEN_REUSED"
IdentityErrorCodes.InsufficientPermissions // "IDENTITY_INSUFFICIENT_PERMISSIONS"
// ... see IdentityErrorCodes class for full list
WellKnownRoles / WellKnownPermissions / WellKnownUserTypes
Convenience constants for seed data. The database is the source of truth — new roles, permissions, and user types can be created at runtime via the API without a package update.
// Use for compile-time references to seed data
[RequirePermission(WellKnownPermissions.MerchantKycApprove)]
// Use plain strings for runtime-created permissions
[RequirePermission("custom.permission")]
Enums
public enum UserStatus
{
PendingActivation,
Active,
Disabled,
Locked
}
Event Contracts
Kafka event payloads published by the Identity Service:
| Event | Published When |
|---|---|
UserCreatedEvent |
New user created |
UserActivatedEvent |
User activated their account |
UserDisabledEvent |
User disabled |
UserLoggedInEvent |
Successful login |
UserLoggedOutEvent |
Single-device logout |
UserLoggedOutAllDevicesEvent |
All-device logout |
AccountLockedEvent |
Account locked after failed attempts |
PasswordChangedEvent |
Password changed or reset |
PasswordResetRequestedEvent |
Password reset requested |
RoleAssignedEvent |
Role assigned to user |
PermissionAssignedEvent |
Permission assigned to user |
ServiceClientCreatedEvent |
New API client created |
Subscribe to these in your service to react to identity events.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. 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 was computed. 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. |
-
net8.0
- No dependencies.
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Brixa.Identity.Contracts:
| Package | Downloads |
|---|---|
|
Brixa.Identity.Abstractions
Interfaces and abstractions for Brixa.Identity platform. |
|
|
Brixa.Identity.Platform
Meta-package that includes all Brixa.Identity NuGet packages for consuming services. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 212 | 4/27/2026 |