MicroserviceCore 1.0.24
dotnet add package MicroserviceCore --version 1.0.24
NuGet\Install-Package MicroserviceCore -Version 1.0.24
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="MicroserviceCore" Version="1.0.24" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MicroserviceCore --version 1.0.24
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: MicroserviceCore, 1.0.24"
#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.
// Install MicroserviceCore as a Cake Addin #addin nuget:?package=MicroserviceCore&version=1.0.24 // Install MicroserviceCore as a Cake Tool #tool nuget:?package=MicroserviceCore&version=1.0.24
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
1-)Redis Cache Setting
Environment setting:
"CacheConfig": {
"Url": "localhost:6379" //Redis URL Address
}
Program.cs
builder.Services.AddDistributedCache(builder.Configuration);
How To Using:
private readonly IDistributedCache _cache;
1-)Redis Cache Setting
Use your own authorization handler or check on the (default)auth server
public class AuthorizationPermissionHandler : IAuthorizationPermissionHandler
{
private readonly AuthServerDbContext _context;
public AuthorizationPermissionHandler(AuthServerDbContext context)
{
_context = context;
}
public async Task<bool> Handle(string userId, List<string> roles, string permissionName)
{
return true; // In this method, authorization is checked.
}
}
Program.cs:
//authorization is checked.
builder.Services.AddScoped<IAuthorizationPermissionHandler, AuthorizationPermissionHandler>();
//We updated the authorize endpoint
builder.Services.AddSingleton<IAuthorizationHandler, PermissionAuthorizationHandler>();
//Add all permissions
builder.Services.AddAuthorization(options =>
{
options.SaveAllPermissions();
});
How to Using: ```Csharp [Authorize(Permissions.AuthService_User_GetAll)]
Product | Versions 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- Microsoft.AspNetCore.Authorization (>= 8.0.0)
- Microsoft.AspNetCore.Http.Abstractions (>= 2.2.0)
- Microsoft.Extensions.Caching.StackExchangeRedis (>= 8.0.0)
- Microsoft.Extensions.Configuration.Abstractions (>= 8.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 8.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.24 | 215 | 11/23/2023 |
1.0.23 | 111 | 11/22/2023 |
1.0.22 | 115 | 11/22/2023 |
1.0.21 | 118 | 11/22/2023 |
1.0.20 | 93 | 11/22/2023 |
1.0.19 | 110 | 11/22/2023 |
1.0.18 | 123 | 11/22/2023 |
1.0.16 | 106 | 11/20/2023 |
1.0.15 | 115 | 11/20/2023 |
1.0.14 | 117 | 11/19/2023 |
1.0.13 | 110 | 11/19/2023 |
1.0.12 | 110 | 11/19/2023 |
1.0.11 | 112 | 11/19/2023 |
1.0.10 | 109 | 11/19/2023 |
1.0.9 | 116 | 11/19/2023 |
1.0.8 | 115 | 11/18/2023 |
1.0.7 | 111 | 11/18/2023 |
1.0.6 | 102 | 11/18/2023 |
1.0.5 | 121 | 11/18/2023 |
1.0.4 | 121 | 11/18/2023 |
1.0.3 | 114 | 11/18/2023 |
1.0.2 | 97 | 11/18/2023 |
1.0.1 | 111 | 11/17/2023 |
1.0.0 | 113 | 11/17/2023 |