IBeam.Identity.Api
2.0.32
dotnet add package IBeam.Identity.Api --version 2.0.32
NuGet\Install-Package IBeam.Identity.Api -Version 2.0.32
<PackageReference Include="IBeam.Identity.Api" Version="2.0.32" />
<PackageVersion Include="IBeam.Identity.Api" Version="2.0.32" />
<PackageReference Include="IBeam.Identity.Api" />
paket add IBeam.Identity.Api --version 2.0.32
#r "nuget: IBeam.Identity.Api, 2.0.32"
#:package IBeam.Identity.Api@2.0.32
#addin nuget:?package=IBeam.Identity.Api&version=2.0.32
#tool nuget:?package=IBeam.Identity.Api&version=2.0.32
IBeam.Identity.Api
Reusable identity API module for OTP, password, OAuth, token, and session endpoints.
Narrative Introduction
This package is for API hosts that want to expose identity endpoints quickly with sensible defaults. It composes identity services, Azure-backed repository providers, communications providers, and JWT authentication wiring into a single startup flow while still allowing host-level overrides.
Features and Components
- DI entry points:
AddIBeamIdentityApi(IConfiguration)AddIBeamIdentityApiControllers()
- pre-wired dependencies:
- identity services and auth flow services
- Azure Table identity repository provider
- Azure Communications email and SMS providers
- JWT authentication and authorization configuration
- controller endpoints in
AuthControllercovering OTP/password/OAuth/token/session flowsRolesControllerfor tenant role CRUD + user role grant/revoke- role authorization attributes:
[AllowRoles("owner","admin")](role-name claims)[AllowRoleIds("3f7a4b4f-8fc5-49bb-b6fe-1f4a9b43a3e9")](role-id claims)
Dependencies
- Internal packages:
IBeam.CommunicationsIBeam.Communications.Email.AzureCommunicationsIBeam.Communications.Sms.AzureCommunicationsIBeam.Identity.Repositories.AzureTableIBeam.Identity.Services
- External packages:
Microsoft.AspNetCore.Authentication.JwtBearerSystem.IdentityModel.Tokens.JwtMicrosoft.AspNetCore.Appframework reference
Quick Start
builder.Services.AddIBeamIdentityApi(builder.Configuration);
builder.Services.AddIBeamIdentityApiControllers();
Role Management Endpoints
GET /api/tenants/{tenantId}/rolesPOST /api/tenants/{tenantId}/rolesPUT /api/tenants/{tenantId}/roles/{roleId}DELETE /api/tenants/{tenantId}/roles/{roleId}POST /api/tenants/{tenantId}/roles/grantPOST /api/tenants/{tenantId}/roles/revokeGET /api/tenants/{tenantId}/users/{userId}/roles
Role management endpoints require an authenticated tenant token (tid) with one of these role claims: owner, administrator, or admin.
Attribute Examples
[AllowRoles("owner", "admin")]
public sealed class PatientController : ControllerBase
{
[HttpPost("save")]
[AllowRoleIds("3f7a4b4f-8fc5-49bb-b6fe-1f4a9b43a3e9")]
public IActionResult Save() => Ok();
}
AllowRoles uses built-in ASP.NET Core role authorization against the role claim type.
AllowRoleIds uses a dynamic policy that checks rid (or role_id) claims.
| 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
- IBeam.Communications (>= 2.0.32)
- IBeam.Communications.Email.AzureCommunications (>= 2.0.32)
- IBeam.Communications.Sms.AzureCommunications (>= 2.0.32)
- IBeam.Identity.Repositories.AzureTable (>= 2.0.32)
- IBeam.Identity.Services (>= 2.0.32)
- Microsoft.AspNetCore.Authentication.JwtBearer (>= 10.0.2)
- System.IdentityModel.Tokens.Jwt (>= 8.16.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.