AuthenticationService.Commons
10.2.0
dotnet add package AuthenticationService.Commons --version 10.2.0
NuGet\Install-Package AuthenticationService.Commons -Version 10.2.0
<PackageReference Include="AuthenticationService.Commons" Version="10.2.0" />
<PackageVersion Include="AuthenticationService.Commons" Version="10.2.0" />
<PackageReference Include="AuthenticationService.Commons" />
paket add AuthenticationService.Commons --version 10.2.0
#r "nuget: AuthenticationService.Commons, 10.2.0"
#:package AuthenticationService.Commons@10.2.0
#addin nuget:?package=AuthenticationService.Commons&version=10.2.0
#tool nuget:?package=AuthenticationService.Commons&version=10.2.0
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 as10.*, and upgrade deliberately using the release notes. AuthenticationService.CommonsandApiFeatures.Authentications.Users.Coresare 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
- 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 theusinglines:AuthenticationService.Commons.Constants(AuthenticationProviders,UserStatuses,ValidationConstraints,BusinessMessageCodes,ValidationMessageCodes) →ApiFeatures.Authentications.Users.Cores.ConstantsAuthenticationService.Commons.Models(IUser,UserDto,Coordinate,CentralCoordinate) →ApiFeatures.Authentications.Users.Cores.Models
ValidRolesandUserPermissionsare removed with no replacement in this package. A user has one role and exact permissions (below).UserDtogainsRoleandPermissions.Roleis{ id, code, displayName }of the single role of the user.Permissionsholds 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.CoresREADME.
UserDto.RolesandUserDto.AssignedFeaturesare deprecated.Rolesnow holds the role code in its exact case (["ADMIN"]; before: free text such asadmin), so code that compares it withadminmust change.AssignedFeaturesholds the same joined paths asPermissions. 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 | 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
- ApiFeatures.Authentications.Users.Cores (>= 10.0.0)
- MassTransit (>= 8.5.7)
-
net9.0
- ApiFeatures.Authentications.Users.Cores (>= 10.0.0)
- MassTransit (>= 8.5.7)
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.
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.