feat(DIExtensions): Hinzufügen einer Ausnahmemeldung.

This commit is contained in:
Developer 02 2025-03-11 16:32:56 +01:00
parent b4068eff8e
commit dd62af5ada
3 changed files with 11 additions and 7 deletions

View File

@ -6,7 +6,7 @@
<Nullable>enable</Nullable>
<Description>DigitalData.Auth.Abstractions defines lightweight interfaces for sending and receiving authentication keys in .NET applications. It provides a unified IAuthClient for managing connections and errors, enabling seamless integration with authentication systems.</Description>
<PackageId>DigitalData.Auth.Abstractions</PackageId>
<Version>1.1.0</Version>
<Version>1.2.0</Version>
<Company>Digital Data GmbH</Company>
<Product>Digital Data GmbH</Product>
<Copyright>Copyright 2025</Copyright>
@ -14,8 +14,8 @@
<PackageIcon>auth_icon.png</PackageIcon>
<RepositoryUrl>http://git.dd:3000/AppStd/DigitalData.Auth</RepositoryUrl>
<PackageTags>Digital Data Auth Authorization Authentication Abstractions</PackageTags>
<AssemblyVersion>1.1.0</AssemblyVersion>
<FileVersion>1.1.0</FileVersion>
<AssemblyVersion>1.2.0</AssemblyVersion>
<FileVersion>1.2.0</FileVersion>
</PropertyGroup>
<ItemGroup>

View File

@ -23,7 +23,11 @@ public static class DIExtensions
var client = sp.GetRequiredService<IAuthClient>() as AuthClient;
if (client is not null)
return client;
else throw new Exception();
else throw new InvalidOperationException(
"IAuthClient instance could not be resolved from the service provider. " +
"This may indicate that the 'AddAuthHubClient' extension method was not called " +
"or there was an issue with the dependency registration process."
);
});
return services;

View File

@ -5,7 +5,7 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<PackageId>DigitalData.Auth.Client</PackageId>
<Version>1.2.0</Version>
<Version>1.2.1.1</Version>
<Description>DigitalData.Auth.Client is a SignalR-based authentication client that enables applications to connect to a central authentication hub for real-time message exchange. It provides seamless connection management, automatic reconnection (RetryPolicy), and event-driven communication (ClientEvents). The package includes dependency injection support via DIExtensions, allowing easy integration into ASP.NET Core applications. With built-in retry policies and secure message handling, it ensures a reliable and scalable authentication client for real-time authentication workflows.</Description>
<Company>Digital Data GmbH</Company>
<Product>Digital Data GmbH</Product>
@ -14,8 +14,8 @@
<PackageIcon>auth_icon.png</PackageIcon>
<RepositoryUrl>http://git.dd:3000/AppStd/DigitalData.Auth</RepositoryUrl>
<PackageTags>Digital Data Auth Authorization Authentication</PackageTags>
<AssemblyVersion>1.2.0</AssemblyVersion>
<FileVersion>1.2.0</FileVersion>
<AssemblyVersion>1.2.1.1</AssemblyVersion>
<FileVersion>1.2.1.1</FileVersion>
</PropertyGroup>
<ItemGroup>