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
                    
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="Brixa.Identity.Contracts" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Brixa.Identity.Contracts" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Brixa.Identity.Contracts" />
                    
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 Brixa.Identity.Contracts --version 1.0.0
                    
#r "nuget: Brixa.Identity.Contracts, 1.0.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 Brixa.Identity.Contracts@1.0.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=Brixa.Identity.Contracts&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Brixa.Identity.Contracts&version=1.0.0
                    
Install as a Cake Tool

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • 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