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
#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

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 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.

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 207 11/23/2023
1.0.23 103 11/22/2023
1.0.22 104 11/22/2023
1.0.21 108 11/22/2023
1.0.20 85 11/22/2023
1.0.19 102 11/22/2023
1.0.18 113 11/22/2023
1.0.16 95 11/20/2023
1.0.15 103 11/20/2023
1.0.14 108 11/19/2023
1.0.13 100 11/19/2023
1.0.12 100 11/19/2023
1.0.11 102 11/19/2023
1.0.10 101 11/19/2023
1.0.9 108 11/19/2023
1.0.8 105 11/18/2023
1.0.7 103 11/18/2023
1.0.6 94 11/18/2023
1.0.5 113 11/18/2023
1.0.4 114 11/18/2023
1.0.3 103 11/18/2023
1.0.2 89 11/18/2023
1.0.1 103 11/17/2023
1.0.0 103 11/17/2023