AuthenticationService.Commons 10.2.0

dotnet add package AuthenticationService.Commons --version 10.2.0
                    
NuGet\Install-Package AuthenticationService.Commons -Version 10.2.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="AuthenticationService.Commons" Version="10.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="AuthenticationService.Commons" Version="10.2.0" />
                    
Directory.Packages.props
<PackageReference Include="AuthenticationService.Commons" />
                    
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 AuthenticationService.Commons --version 10.2.0
                    
#r "nuget: AuthenticationService.Commons, 10.2.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 AuthenticationService.Commons@10.2.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=AuthenticationService.Commons&version=10.2.0
                    
Install as a Cake Addin
#tool nuget:?package=AuthenticationService.Commons&version=10.2.0
                    
Install as a Cake Tool

AuthenticationService.Commons

The MassTransit contracts of the iot-vn Authentication Service. Other services reference this package to read users from the Authentication Service over RabbitMQ.

Targets: net9.0, net10.0.

Package

Published on nuget.org as AuthenticationService.Commons (MIT license, symbols and Source Link). Dependencies:

  • ApiFeatures.Authentications.Users.Cores (>= 10.0.0): the user model (UserDto, UserRoleDto, IUser, Coordinate, CentralCoordinate) and the user constants.
  • MassTransit.

Contents

Namespace Types
AuthenticationService.Commons.Models.RequestMessages GetUserByIdRequestMessage, GetUserByUsernameRequestMessage, GetUsersByIdsRequestMessage, GetUserBySessionKeyRequestMessage
AuthenticationService.Commons.Models.ResponseMessages GetUserByIdResponseMessage, GetUserByUsernameResponseMessage, GetUsersByIdsResponseMessage, GetUserBySessionKeyResponseMessage (each carries UserDto values)
AuthenticationService.Commons.Models.EventMessages UserAddedMessage, UserPasswordResetMessage
AuthenticationService.Commons.Services.Interfaces / .Implementations IUserService / UserService: the request client (GetByIdAsync, GetByUsernameAsync, GetByIdsAsync, GetBySessionKeyAsync) built on the MassTransit IRequestClient<T> of each request message

A consuming service registers the MassTransit request clients of the request messages it uses and IUserService / UserService. The Authentication Service answers the requests; the RabbitMQ message names are the message class names.

Versioning

  • The major version is the highest .NET version the package targets (10.x for net10.0). Minor versions are for features and for changes within that .NET line; patch versions are for fixes.
  • A minor version can contain breaking changes (10.2.0 is one). Pin an exact version (Version="10.2.0"), not a floating range such as 10.*, and upgrade deliberately using the release notes.
  • AuthenticationService.Commons and ApiFeatures.Authentications.Users.Cores are released together; the release notes name the tested set.

Release notes

10.2.0 (breaking compared with 10.1.0)

Depends on ApiFeatures.Authentications.Users.Cores >= 10.0.0.

Migrating from 10.1.0

  1. The user model and the constants moved to ApiFeatures.Authentications.Users.Cores. The package is a dependency, so it is restored with this one; change the using lines:
    • AuthenticationService.Commons.Constants (AuthenticationProviders, UserStatuses, ValidationConstraints, BusinessMessageCodes, ValidationMessageCodes) → ApiFeatures.Authentications.Users.Cores.Constants
    • AuthenticationService.Commons.Models (IUser, UserDto, Coordinate, CentralCoordinate) → ApiFeatures.Authentications.Users.Cores.Models
  2. ValidRoles and UserPermissions are removed with no replacement in this package. A user has one role and exact permissions (below).
  3. UserDto gains Role and Permissions.
    • Role is { id, code, displayName } of the single role of the user.
    • Permissions holds the role's permissions as joined path strings exactly as granted, which may be wildcards ("*", "user.*", "user.create").
    • Match them segment-safely, never with a regular expression: see "Matching permissions in a consuming service" in the ApiFeatures.Authentications.Users.Cores README.
  4. UserDto.Roles and UserDto.AssignedFeatures are deprecated. Roles now holds the role code in its exact case (["ADMIN"]; before: free text such as admin), so code that compares it with admin must change. AssignedFeatures holds the same joined paths as Permissions. Both are removed in a later version.

Unchanged: the request, response and event messages and the request client keep their namespaces and type names, and the RabbitMQ message names are the same.

10.1.0

First Commons 10.x release on nuget.org: UserDto replaced the IotVn User in the response messages and in IUserService. See the repository README, section 5.

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

NuGet packages (2)

Showing the top 2 NuGet packages that depend on AuthenticationService.Commons:

Package Downloads
AuthenticationService.Cores

Package Description

ApiFeatures.Authentications.Users

The Users module of the iot-vn Authentication Service: the user endpoints, authorization, consumers and hosted services. It reads no configuration and registers no database.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
10.2.0 74 11/24/2026
10.1.0 125 11/11/2026
9.1.0 348 5/13/2026

Breaking compared with 10.1.0 (10.2.0 is a minor version under the .NET-major versioning convention; pin an exact version). Depends on ApiFeatures.Authentications.Users.Cores (>= 10.0.0). The constants (AuthenticationProviders, UserStatuses, ValidationConstraints, BusinessMessageCodes, ValidationMessageCodes) and IUser, UserDto, Coordinate, CentralCoordinate moved to ApiFeatures.Authentications.Users.Cores (namespaces ApiFeatures.Authentications.Users.Cores.Constants / .Models). ValidRoles and UserPermissions were removed. UserDto gains Role (id, code, displayName) and Permissions (joined paths as granted, for example "*", "user.*"); UserDto.Roles now holds the role code (for example ADMIN, was free text such as admin) and UserDto.AssignedFeatures the same joined paths as Permissions; both are deprecated. Consumers must match wildcards segment-safely (see the Users.Cores README). Unchanged: the messages and the request client keep their namespaces and names, and the RabbitMQ message names are the same.