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 | 208 | 11/23/2023 |
1.0.23 | 104 | 11/22/2023 |
1.0.22 | 105 | 11/22/2023 |
1.0.21 | 109 | 11/22/2023 |
1.0.20 | 86 | 11/22/2023 |
1.0.19 | 103 | 11/22/2023 |
1.0.18 | 114 | 11/22/2023 |
1.0.16 | 96 | 11/20/2023 |
1.0.15 | 104 | 11/20/2023 |
1.0.14 | 109 | 11/19/2023 |
1.0.13 | 101 | 11/19/2023 |
1.0.12 | 101 | 11/19/2023 |
1.0.11 | 103 | 11/19/2023 |
1.0.10 | 102 | 11/19/2023 |
1.0.9 | 109 | 11/19/2023 |
1.0.8 | 106 | 11/18/2023 |
1.0.7 | 104 | 11/18/2023 |
1.0.6 | 95 | 11/18/2023 |
1.0.5 | 114 | 11/18/2023 |
1.0.4 | 115 | 11/18/2023 |
1.0.3 | 104 | 11/18/2023 |
1.0.2 | 90 | 11/18/2023 |
1.0.1 | 104 | 11/17/2023 |
1.0.0 | 104 | 11/17/2023 |