Alpha state. A platform designed for building enterprise-grade, multi-tenant products using Azure, .NET, React, TypeScript, Infrastructure as Code, etc.
Move authentication token logic to the SharedKernel for improved separation of concerns, enabling tests in other self-contained systems to generate valid access tokens. This includes using UserInfo instead of User to create tokens. The AuthenticationTokenGenerator has been split into AccessTokenGenerator, RefreshTokenGenerator, and SecurityTokenDescriptorExtensions, providing clear and modular responsibilities.
Introduce a strongly typed ID for RefreshTokenId to enhance type safety. Standardize the naming of authentication cookies, changing from hyphen-case (refresh-token and access-token) to snake_case (refresh_token and access_token) to align with common practices.
Additional improvements include extracting refresh and access token validation periods into constants with added documentation. The RefreshAuthenticationTokens command now returns an Unauthorized result instead of throwing exceptions for invalid refresh tokens.
The CreateUser command has been updated to validate that the TenantId matches the execution context, except during signup, ensuring data integrity.
New HTTP clients (anonymous and authenticated) have been introduced in the BackOffice self-contained system's EndpointBaseTest, facilitating robust testing.
Downstream Projects
Update BaseTest and EndpointBaseTest go gain access to the making authenticated API calls.
Checklist
[x] I have added a Label to the pull-request
[x] I have added tests, and done manual regression tests
[x] I have updated the documentation, if necessary
Summary & Motivation
Move authentication token logic to the SharedKernel for improved separation of concerns, enabling tests in other self-contained systems to generate valid access tokens. This includes using
UserInfo
instead ofUser
to create tokens. TheAuthenticationTokenGenerator
has been split intoAccessTokenGenerator
,RefreshTokenGenerator
, andSecurityTokenDescriptorExtensions
, providing clear and modular responsibilities.Introduce a strongly typed ID for
RefreshTokenId
to enhance type safety. Standardize the naming of authentication cookies, changing from hyphen-case (refresh-token
andaccess-token
) to snake_case (refresh_token
andaccess_token
) to align with common practices.Additional improvements include extracting refresh and access token validation periods into constants with added documentation. The
RefreshAuthenticationTokens
command now returns anUnauthorized
result instead of throwing exceptions for invalid refresh tokens.The
CreateUser
command has been updated to validate that theTenantId
matches the execution context, except during signup, ensuring data integrity.New HTTP clients (anonymous and authenticated) have been introduced in the BackOffice self-contained system's
EndpointBaseTest
, facilitating robust testing.Downstream Projects
Update
BaseTest
andEndpointBaseTest
go gain access to the making authenticated API calls.Checklist