HoneyDrunk.Auth.Abstractions
0.6.0
dotnet add package HoneyDrunk.Auth.Abstractions --version 0.6.0
NuGet\Install-Package HoneyDrunk.Auth.Abstractions -Version 0.6.0
<PackageReference Include="HoneyDrunk.Auth.Abstractions" Version="0.6.0" />
<PackageVersion Include="HoneyDrunk.Auth.Abstractions" Version="0.6.0" />
<PackageReference Include="HoneyDrunk.Auth.Abstractions" />
paket add HoneyDrunk.Auth.Abstractions --version 0.6.0
#r "nuget: HoneyDrunk.Auth.Abstractions, 0.6.0"
#:package HoneyDrunk.Auth.Abstractions@0.6.0
#addin nuget:?package=HoneyDrunk.Auth.Abstractions&version=0.6.0
#tool nuget:?package=HoneyDrunk.Auth.Abstractions&version=0.6.0
HoneyDrunk.Auth.Abstractions
Pure contracts and abstractions for HoneyDrunk.Auth - Zero dependencies, designed for shared libraries and domain projects.
📋 What Is This?
This package provides the foundational interfaces and models used throughout the HoneyDrunk.Auth ecosystem. It has no external dependencies, making it ideal for defining contracts in shared libraries or domain projects without pulling in runtime implementations.
📦 Installation
dotnet add package HoneyDrunk.Auth.Abstractions
<PackageReference Include="HoneyDrunk.Auth.Abstractions" Version="0.1.0" />
🔑 Key Types
Interfaces
| Interface | Description |
|---|---|
IAuthenticationProvider |
Contract for validating credentials and producing authenticated identities |
IAuthorizationPolicy |
Contract for evaluating authorization decisions against a request |
Models
| Type | Description |
|---|---|
AuthCredential |
Represents authentication credentials (e.g., Bearer token) |
AuthenticatedIdentity |
Represents a successfully authenticated user with claims |
AuthenticationResult |
Result of an authentication attempt (success or failure) |
AuthorizationRequest |
Describes an authorization check (action, resource, required roles) |
AuthorizationDecision |
Result of an authorization evaluation (allowed or denied) |
DenyReason |
Structured denial reason with code and message |
Enums
| Enum | Description |
|---|---|
AuthScheme |
Supported authentication schemes (e.g., Bearer) |
AuthenticationFailureCode |
Failure codes for authentication errors |
AuthorizationDenyCode |
Denial codes for authorization failures |
Constants
| Constant | Description |
|---|---|
AuthClaimTypes |
Standard JWT claim type constants (sub, role, scope, etc.) |
💡 Usage Example
// Create an authorization request
var request = new AuthorizationRequest(
action: "delete",
resource: "users/123",
requiredRoles: ["admin"]);
// Check claims on an identity
if (identity.HasClaim(AuthClaimTypes.Role, "admin"))
{
// User has admin role
}
// Get tenant context
var tenantId = identity.GetClaimValue(AuthClaimTypes.TenantId);
🔗 Related Packages
| Package | Description |
|---|---|
| HoneyDrunk.Auth | Core runtime with JWT validation and Vault integration |
| HoneyDrunk.Auth.AspNetCore | ASP.NET Core middleware and extensions |
📖 Documentation
- Abstractions Guide - Detailed documentation for all types
- FILE_GUIDE.md - Complete architecture reference
⚖️ License
This project is licensed under the MIT License.
<div align="center">
Built with ❤️ by HoneyDrunk Studios
</div>
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. 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. |
-
net10.0
- No dependencies.
NuGet packages (2)
Showing the top 2 NuGet packages that depend on HoneyDrunk.Auth.Abstractions:
| Package | Downloads |
|---|---|
|
HoneyDrunk.Auth
Authentication and authorization library for .NET. Provides JWT Bearer token validation, policy-based authorization, Vault-backed signing key management, and integration with HoneyDrunk.Kernel for Grid-aware context propagation. |
|
|
HoneyDrunk.Auth.AspNetCore
ASP.NET Core integration for HoneyDrunk.Auth. Provides middleware for JWT Bearer token authentication, HttpContext identity accessors, and seamless integration with ASP.NET Core's authentication pipeline. |
GitHub repositories
This package is not used by any popular GitHub repositories.
v0.6.0: Package version aligned with the HoneyDrunk.Auth 0.6.0 Sonar follow-up release (ADR-0011 D11). No contract changes. See CHANGELOG.md for details.