Levge.Identity
1.1.46
See the version list below for details.
dotnet add package Levge.Identity --version 1.1.46
NuGet\Install-Package Levge.Identity -Version 1.1.46
<PackageReference Include="Levge.Identity" Version="1.1.46" />
<PackageVersion Include="Levge.Identity" Version="1.1.46" />
<PackageReference Include="Levge.Identity" />
paket add Levge.Identity --version 1.1.46
#r "nuget: Levge.Identity, 1.1.46"
#:package Levge.Identity@1.1.46
#addin nuget:?package=Levge.Identity&version=1.1.46
#tool nuget:?package=Levge.Identity&version=1.1.46
<img src="src/Levge.Identity/icon.png" width="100" height="100" alt="Levge.Identity logo" />
Levge.Identity
Levge.Identity, .NET 8 ve .NET 9 uygulamalar� i�in JWT deste�i, parola karma, kod �retimi ve geni�letilebilir kullan�c� ba�lam� ile kimlik ve kimlik do�rulama hizmetleri sa�layan bir k�t�phanedir. E-posta bildirim yeteneklerini de i�erir.
�zellikler
- ? JWT tabanl� kimlik do�rulama ve yetkilendirme
- ? G��l� parola karma (PBKDF2)
- ?
ICurrentUser<T>ile kullan�c� ba�lam� ve taleplere (claims) eri�im - ? G�venli kod ve parola olu�turma ara�lar�
- ? Geni�letilebilir kimlik sa�lay�c� modeli
- ? ASP.NET Core DI ile kolay entegrasyon
Kurulum
.NET CLI
dotnet add package Levge.Identity
Paket Y�neticisi
Install-Package Levge.Identity
Yap�land�rma
Program.cs i�erisine yap�land�rmay� ekleyin:
Varsay�lan kullan�m:
builder.Services.AddLevgeIdentity<string>(builder.Configuration);Veya �zel yap�land�rma nesnesi ile:
var identityConfig = new IdentityConfig { Jwt = new JwtConfig { Issuer = "your-issuer", Audience = "your-audience", Secret = "your-secret-key", // ...di�er se�enekler } }; builder.Services.AddIdentity<LevgeIdentityProvider, string>(identityConfig);Mevcut kullan�c�ya eri�im DI �zerinden:
public class MyController : ControllerBase { private readonly ICurrentUser<string> _currentUser; public MyController(ICurrentUser<string> currentUser) { _currentUser = currentUser; } // ... }
Kullan�m
- JWT Token �retimi:
Eri�im/yenileme belirteci (token) �retimi i�in
IJwtTokenServicekullan�n. - Parola Karma (Hashing):
G�venli parola saklama i�in
IPasswordHasherkullan�n. - Kod �retimi:
Say�sal, alfanumerik veya kapsaml� kodlar i�in
ICodeGeneratorkullan�n. - Kullan�c� Bilgisine Eri�im:
Kullan�c� kimli�i, e-posta, rol, talepler vb. almak i�in
ICurrentUser<TKey>kullan�n.
var token = jwtTokenService.GenerateAccessToken(claims);
var passwordHash = passwordHasher.Hash("myPassword");
var code = codeGenerator.GenerateNumericCode();
if (!_currentUser.IsAuthenticated)
throw new LevgeException("Not authenticated");
Yap�land�rma Se�enekleri
| Se�enek | A��klama |
|---|---|
Issuer |
JWT belirteci yay�nc�s� |
Audience |
JWT belirteci izleyicisi |
Authority |
Do�rulama i�in yetkili otorite |
Secret |
JWT imzalamak i�in gizli anahtar |
AccessTokenExpirationMinutes |
Eri�im belirteci ge�erlilik s�resi (dakika) |
RefreshTokenExpirationMinutes |
Yenileme belirteci ge�erlilik s�resi (dakika) |
EnableRefreshTokens |
Yenileme belirte�lerini etkinle�tir |
ValidateIssuer |
Yay�nc�y� do�rula |
ValidateAudience |
�zleyiciyi do�rula |
ValidateLifetime |
Kullan�m �mr�n� do�rula |
ValidateSigningKey |
�mza anahtar�n� do�rula |
AuthScheme |
Kimlik do�rulama �emas� (varsay�lan: Bearer) |
DefaultScheme |
Varsay�lan kimlik do�rulama �emas� |
Lisans
MIT Lisans�. Detaylar i�in LICENSE dosyas�na bak�n.
| 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. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net8.0
- Levge.Exceptions (>= 1.1.45)
- Microsoft.AspNetCore.Authentication.JwtBearer (>= 8.0.23)
- Microsoft.AspNetCore.Authentication.OpenIdConnect (>= 8.0.23)
-
net9.0
- Levge.Exceptions (>= 1.1.45)
- Microsoft.AspNetCore.Authentication.JwtBearer (>= 9.0.12)
- Microsoft.AspNetCore.Authentication.OpenIdConnect (>= 9.0.12)
NuGet packages (5)
Showing the top 5 NuGet packages that depend on Levge.Identity:
| Package | Downloads |
|---|---|
|
Levge.AuditLog
EF Core tabanlı otomatik audit log altyapısı. Tenant ve soft-delete desteğiyle birlikte clean architecture uyumlu denetim kaydı çözümü. |
|
|
Levge.Tenancy
SaaS uygulamaları için çok kiracılı (multi-tenant) altyapı. JWT tabanlı tenant çözümleme, EF Core Global Query Filter ve tenant yaşam döngüsü yönetimi. |
|
|
Levge.Subscription
Levge ekosistemi için opsiyonel abonelik ve kota takip altyapısı. Plan, modül, tenant aboneliği, kullanım takibi ve yenileme job desteği. AddLevgeSubscription() ile projeye eklenebilir. |
|
|
Levge.MediatR
MediatR tabanlı domain event dispatcher, EF Core interceptor ve FluentValidation pipeline behavior. IDomainEventDispatcher implementasyonu, SaveChanges sonrası otomatik domain event dispatch ve ValidationBehavior altyapısı. |
|
|
Levge.Caching
Levge ekosistemi için opsiyonel önbellekleme altyapısı. Memory Cache ve Redis desteği, JWT token revoke servisi. AddLevgeCaching() ile projeye eklenebilir. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.3.0 | 188 | 4/29/2026 |
| 2.1.0 | 134 | 4/27/2026 |
| 2.0.1 | 150 | 4/27/2026 |
| 1.1.46 | 159 | 1/22/2026 |
| 1.1.45 | 409 | 1/20/2026 |
| 1.1.44 | 124 | 1/20/2026 |
| 1.1.43 | 630 | 7/3/2025 |
| 1.1.42 | 248 | 7/3/2025 |
| 1.1.41 | 269 | 6/22/2025 |
| 1.1.21 | 198 | 6/22/2025 |
| 1.1.1 | 507 | 6/18/2025 |
| 1.1.0 | 242 | 6/18/2025 |
| 1.0.5 | 225 | 6/17/2025 |
| 1.0.4 | 234 | 6/17/2025 |
| 1.0.3 | 232 | 6/17/2025 |
| 1.0.2 | 232 | 6/17/2025 |
| 1.0.0 | 245 | 6/16/2025 |