MicroserviceCore 1.0.21
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package MicroserviceCore --version 1.0.21
NuGet\Install-Package MicroserviceCore -Version 1.0.21
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.21" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MicroserviceCore --version 1.0.21
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: MicroserviceCore, 1.0.21"
#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.21 // Install MicroserviceCore as a Cake Tool #tool nuget:?package=MicroserviceCore&version=1.0.21
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 | 211 | 11/23/2023 |
1.0.23 | 105 | 11/22/2023 |
1.0.22 | 108 | 11/22/2023 |
1.0.21 | 112 | 11/22/2023 |
1.0.20 | 87 | 11/22/2023 |
1.0.19 | 104 | 11/22/2023 |
1.0.18 | 117 | 11/22/2023 |
1.0.16 | 98 | 11/20/2023 |
1.0.15 | 105 | 11/20/2023 |
1.0.14 | 112 | 11/19/2023 |
1.0.13 | 102 | 11/19/2023 |
1.0.12 | 104 | 11/19/2023 |
1.0.11 | 106 | 11/19/2023 |
1.0.10 | 103 | 11/19/2023 |
1.0.9 | 112 | 11/19/2023 |
1.0.8 | 111 | 11/18/2023 |
1.0.7 | 105 | 11/18/2023 |
1.0.6 | 96 | 11/18/2023 |
1.0.5 | 117 | 11/18/2023 |
1.0.4 | 116 | 11/18/2023 |
1.0.3 | 105 | 11/18/2023 |
1.0.2 | 91 | 11/18/2023 |
1.0.1 | 105 | 11/17/2023 |
1.0.0 | 105 | 11/17/2023 |