WebPack.Identity.CoreLib
0.4.16
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 WebPack.Identity.CoreLib --version 0.4.16
NuGet\Install-Package WebPack.Identity.CoreLib -Version 0.4.16
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="WebPack.Identity.CoreLib" Version="0.4.16" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add WebPack.Identity.CoreLib --version 0.4.16
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: WebPack.Identity.CoreLib, 0.4.16"
#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 WebPack.Identity.CoreLib as a Cake Addin #addin nuget:?package=WebPack.Identity.CoreLib&version=0.4.16 // Install WebPack.Identity.CoreLib as a Cake Tool #tool nuget:?package=WebPack.Identity.CoreLib&version=0.4.16
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
WebPack.Identity.CoreLib
Identity Pack For ASP.NET Core
use Basic Authentication
Add IBasicAuthenticationService
public class HogeBasicAuthenticationService : IBasicAuthenticationService {
//Use ORMIntegrator(ctor Injection...)
readonly SqlManager<HogeContext> _sqlManager;
public HogeBasicAuthenticationService(SqlManager<HogeContext> sqlManager) =>
_sqlManager = sqlManager;
public async ValueTask<(bool authenticateResult, Claim[] authenticatedUserClaims)> AuthenticateAsync(string username, string password) {
if (await _sqlManager.DbContext.MstHoges.FirstOrDefaultAsync(e => e.UserId == username && e.Password == password) is not MstPartner authenticatedUser) {
return (authenticateResult: false, authenticatedUserClaims: System.Array.Empty<Claim>());
}
return (
true,
new[] {
new Claim(ClaimTypes.NameIdentifier, authenticatedUser.PartnerId.ToString()),
new Claim(ClaimTypes.Name, authenticatedUser.UserId),
new Claim(ClaimTypes.Email, authenticatedUser.Email),
// Extend Claim Setting Point...
}
);
}
}
Add Service(And HogeBasicAuthenticationService DI Setting)
public void ConfigureServices(IServiceCollection services) {
//...
services.AddBasicAuthenticationService<HogeBasicAuthenticationService>();
}
Configure
public void Configure(IApplicationBuilder app, IWebHostEnvironment env) {
// Always write UseAuthentication before UseAuthorization
app.UseAuthentication();
app.UseAuthorization();
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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.
-
net6.0
- WebPack.CoreLib (>= 0.9.23)
NuGet packages (2)
Showing the top 2 NuGet packages that depend on WebPack.Identity.CoreLib:
Package | Downloads |
---|---|
Swagger.Extensions.DependencyInjection
For ASP.NET Core Swagger Extension; Include Default Builder; |
|
WebPack.Identity.Gcp.CoreLib
ASP.NET Core Identity Easy setting Package Case Gcp Way. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
0.12.1 | 6,254 | 6/20/2024 |
0.11.2 | 3,527 | 4/3/2024 |
0.11.1 | 1,164 | 3/26/2024 |
0.10.1 | 2,580 | 1/22/2024 |
0.9.4 | 8,590 | 9/13/2023 |
0.9.3 | 757 | 9/12/2023 |
0.9.2 | 1,768 | 8/5/2023 |
0.9.1 | 902 | 8/3/2023 |
0.8.1 | 1,671 | 7/20/2023 |
0.7.5 | 1,058 | 7/5/2023 |
0.7.4 | 4,754 | 5/11/2023 |
0.7.3 | 954 | 4/26/2023 |
0.6.1 | 1,580 | 3/13/2023 |
0.5.5 | 2,848 | 1/17/2023 |
0.5.4 | 1,524 | 1/11/2023 |
0.5.3 | 1,176 | 12/12/2022 |
0.4.16 | 1,297 | 11/24/2022 |
0.4.15 | 1,090 | 11/22/2022 |
0.4.14 | 1,176 | 11/15/2022 |
0.4.13 | 1,840 | 10/24/2022 |
0.4.12 | 2,009 | 10/4/2022 |
0.4.11 | 1,719 | 8/4/2022 |
0.4.10 | 2,924 | 4/11/2022 |
0.4.9 | 2,556 | 3/27/2022 |
0.4.8 | 1,340 | 3/23/2022 |
0.4.7 | 1,276 | 3/15/2022 |
0.4.6 | 1,323 | 3/11/2022 |
0.4.5 | 1,138 | 3/3/2022 |
0.4.4 | 1,227 | 3/3/2022 |
0.4.3 | 1,148 | 2/28/2022 |
0.4.2 | 2,642 | 2/9/2022 |
0.4.1 | 1,560 | 11/12/2021 |
0.3.2 | 1,427 | 9/30/2021 |
0.3.1-beta | 850 | 9/28/2021 |
0.2.2-beta | 993 | 9/15/2021 |
0.1.5-beta | 949 | 8/27/2021 |
update Nuget Package...