Levge.Identity 1.1.45

There is a newer version of this package available.
See the version list below for details.
dotnet add package Levge.Identity --version 1.1.45
                    
NuGet\Install-Package Levge.Identity -Version 1.1.45
                    
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="Levge.Identity" Version="1.1.45" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Levge.Identity" Version="1.1.45" />
                    
Directory.Packages.props
<PackageReference Include="Levge.Identity" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Levge.Identity --version 1.1.45
                    
#r "nuget: Levge.Identity, 1.1.45"
                    
#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.
#:package Levge.Identity@1.1.45
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Levge.Identity&version=1.1.45
                    
Install as a Cake Addin
#tool nuget:?package=Levge.Identity&version=1.1.45
                    
Install as a Cake Tool

<img src="src/Levge.Identity/icon.png" width="100" height="100" alt="Levge.Identity logo" />

Levge.Identity

NuGet Build

🌐 Read in Turkish languages


Levge.Identity is a .NET 8 library providing identity and authentication services with JWT support, password hashing, code generation, and extensible user context for modern applications. Includes email notification capabilities.

Features

  • ? JWT-based authentication and authorization
  • ? Strong password hashing (PBKDF2)
  • ? User context and claims access via ICurrentUser<T>
  • ? Secure code and password generation utilities
  • ? Extensible identity provider model
  • ? Easy integration with ASP.NET Core DI

Installation

.NET CLI

dotnet add package Levge.Identity

Package Manager

Install-Package Levge.Identity

Setup

  1. Add configuration in Program.cs: builder.Services.AddIdentity<JwtIdentityProvider, string>(builder.Configuration); Or with custom config: var identityConfig = new IdentityConfig { Jwt = new JwtConfig { Issuer = "your-issuer", Audience = "your-audience", Secret = "your-secret-key", // ...other options } }; builder.Services.AddIdentity<JwtIdentityProvider, string>(identityConfig);
  2. Access current user via DI: public class MyController : ControllerBase { private readonly ICurrentUser<string> _currentUser; public MyController(ICurrentUser<string> currentUser) { _currentUser = currentUser; } // ... }

Usage

  • Generate JWT tokens: Use IJwtTokenService for access/refresh token generation.
  • Password hashing: Use IPasswordHasher for secure password storage.
  • Code generation: Use ICodeGenerator for numeric, alphanumeric, or scoped codes.
  • Access user info: Use ICurrentUser<TKey> to get user id, email, role, claims, etc. var token = jwtTokenService.GenerateAccessToken(claims); var passwordHash = passwordHasher.Hash("myPassword"); var code = codeGenerator.GenerateNumericCode(); if (!_currentUser.IsAuthenticated) throw new LevgeException("Not authenticated");

Configuration Options

Option Description
Issuer JWT token issuer
Audience JWT token audience
Authority Authority for validation
Secret Secret key for signing JWT
AccessTokenExpirationMinutes Access token expiration in minutes
RefreshTokenExpirationMinutes Refresh token expiration in minutes
EnableRefreshTokens Enable refresh tokens
ValidateIssuer Validate issuer
ValidateAudience Validate audience
ValidateLifetime Validate token lifetime
ValidateSigningKey Validate signing key
AuthScheme Authentication scheme (default: Bearer)
DefaultScheme Default authentication scheme

License

MIT License. See LICENSE for details.

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.  net9.0 was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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

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.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.3.0 166 4/29/2026
2.1.0 121 4/27/2026
2.0.1 136 4/27/2026
1.1.46 148 1/22/2026
1.1.45 291 1/20/2026
1.1.44 115 1/20/2026
1.1.43 509 7/3/2025
1.1.42 237 7/3/2025
1.1.41 259 6/22/2025
1.1.21 188 6/22/2025
1.1.1 495 6/18/2025
1.1.0 231 6/18/2025
1.0.5 215 6/17/2025
1.0.4 222 6/17/2025
1.0.3 219 6/17/2025
1.0.2 222 6/17/2025
1.0.0 238 6/16/2025