Brixa.Identity.Client 1.0.0

dotnet add package Brixa.Identity.Client --version 1.0.0
                    
NuGet\Install-Package Brixa.Identity.Client -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.Client" 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.Client" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Brixa.Identity.Client" />
                    
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.Client --version 1.0.0
                    
#r "nuget: Brixa.Identity.Client, 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.Client@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.Client&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Brixa.Identity.Client&version=1.0.0
                    
Install as a Cake Tool

Brixa.Identity.Client

Typed HTTP client for calling Brixa.Identity.Service with built-in resilience.

Install

dotnet add package Brixa.Identity.Client

Setup

builder.Services.AddBrixaIdentityHttpClient(builder.Configuration);

Or use the all-in-one setup:

builder.Services.AddBrixaIdentity(builder.Configuration);

Configuration

{
  "BrixaIdentity": {
    "BaseUrl": "https://identity.internal",
    "ClientId": "your-service-name",
    "ClientSecret": "from-secret-manager",
    "RequiredScopes": ["identity.users.create"],
    "TimeoutSeconds": 30,
    "RetryCount": 3,
    "CircuitBreakerFailureThreshold": 5,
    "CircuitBreakerDurationSeconds": 30
  }
}

Never put ClientSecret in source control. Use dotnet user-secrets, environment variables, or AWS Secrets Manager.

Usage

IIdentityClient

public class OnboardingService(IIdentityClient identityClient)
{
    public async Task<Guid> CreateMerchantUser(string email, string merchantRef)
    {
        var result = await identityClient.CreateUserAsync(new CreateUserRequest
        {
            FirstName = "Merchant",
            LastName = "User",
            Username = email,
            Email = email,
            UserType = "Merchant",
            MerchantReference = merchantRef,
            Roles = ["MerchantAdmin"]
        });

        if (!result.Success)
            throw new Exception(result.ErrorMessage);

        return result.Data!.UserId;
    }
}

Available Methods

Method Description
LoginAsync Authenticate user
LogoutAsync Logout single device
LogoutAllAsync Logout all devices
RefreshTokenAsync Rotate refresh token
RevokeTokenAsync Revoke a token
GetTokenRevocationStatusAsync Check if JTI is revoked
CreateUserAsync Create a new user
GetUserByIdAsync Get user by ID
GetUserByEmailAsync Get user by email
GetUserByUsernameAsync Get user by username
ActivateUserAsync Activate a pending user
DisableUserAsync Disable a user
ResetPasswordAsync Reset password with token
ForgotPasswordAsync Request password reset
ChangePasswordAsync Change password (authenticated)
AssignRoleAsync Assign role to user
AssignPermissionAsync Assign permission to user
CheckPermissionAsync Check if user has permission
GetUserPermissionsAsync Get all user permissions
CreateServiceTokenAsync Get service-to-service token

IServiceTokenProvider

For service-to-service calls, tokens are cached automatically:

public class MyDelegatingHandler(IServiceTokenProvider tokenProvider) : DelegatingHandler
{
    protected override async Task<HttpResponseMessage> SendAsync(
        HttpRequestMessage request, CancellationToken cancellationToken)
    {
        var token = await tokenProvider.GetTokenAsync(cancellationToken);
        request.Headers.Authorization = new("Bearer", token);
        return await base.SendAsync(request, cancellationToken);
    }
}

Resilience

Built-in Polly policies:

  • Retry — 3 attempts with exponential backoff (configurable)
  • Circuit Breaker — Opens after 5 failures, stays open for 30s (configurable)
  • Timeout — 30s per request (configurable)
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.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on Brixa.Identity.Client:

Package Downloads
Brixa.Identity.AspNetCore

ASP.NET Core integration for Brixa.Identity including JWT auth, current user, and middleware.

Brixa.Identity.Authorization

Permission-based authorization 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 176 4/27/2026