IBeam.Identity
2.0.54
dotnet add package IBeam.Identity --version 2.0.54
NuGet\Install-Package IBeam.Identity -Version 2.0.54
<PackageReference Include="IBeam.Identity" Version="2.0.54" />
<PackageVersion Include="IBeam.Identity" Version="2.0.54" />
<PackageReference Include="IBeam.Identity" />
paket add IBeam.Identity --version 2.0.54
#r "nuget: IBeam.Identity, 2.0.54"
#:package IBeam.Identity@2.0.54
#addin nuget:?package=IBeam.Identity&version=2.0.54
#tool nuget:?package=IBeam.Identity&version=2.0.54
IBeam.Identity
IBeam.Identity is the contract package for the IBeam identity domain.
Narrative Introduction
This package provides the shared language for identity workflows across API, services, and repository implementations. It contains interfaces, request/response models, options, and event contracts so higher-level packages can evolve independently behind stable abstractions.
Identity Architecture (Simple View)
IBeam identity is intentionally layered:
- API Layer (
IBeam.Identity.Api)
- HTTP endpoints, auth middleware, request validation, response mapping.
- Controllers include OTP/password/OAuth/token/session/tenant-role APIs.
- Contract Layer (
IBeam.Identity)
- Interfaces, models, options, events, authorization attributes.
- No storage or provider-specific logic.
- Service Layer (
IBeam.Identity.Services)
- Core auth orchestration: OTP, password, OAuth, token issuing, tenant selection.
- Uses only contracts (
IIdentityUserStore,IOtpChallengeStore, etc.).
- Repository Layer (provider implementations)
- Azure Table provider (
IBeam.Identity.Repositories.AzureTable) currently ships complete implementations. - Entity Framework provider (
IBeam.Identity.Repositories.EntityFramework) exists for EF-based identity paths.
- Communications Layer
- Email/SMS abstractions and providers used by OTP/registration flows.
Features and Components
- auth service contracts:
IIdentityAuthServiceIIdentityOtpAuthServiceIIdentityOAuthAuthServiceITokenService
- store contracts:
IIdentityUserStore,IOtpChallengeStore,IExternalLoginStoreITenantMembershipStore,ITenantProvisioningService,IAuthSessionStoreITenantRoleStorefor tenant-scoped role CRUD and assignmentIPermissionAccessStorefor tenant permission-to-role mappings
- service contracts:
ITenantRoleServiceIRoleAccessAuthorizerIPermissionAccessAuthorizerIPermissionCatalogProvider
- options models (
JwtOptions,OtpOptions,OAuthOptions,FeatureOptions, etc.) - lifecycle event contracts and default no-op implementations
- role access attributes (service-safe, no MVC dependency):
[RoleAccess("owner", "billing")][RoleAccessId("3f7a4b4f-8fc5-49bb-b6fe-1f4a9b43a3e9")][AllowAllRoleAccess]
- dynamic permission attributes:
[PermissionAccess("SavePatient")][PermissionAccessId("6c76f166-b130-4c80-bf7e-99d38ea1a75f")]
Models vs Entities
- Models
- Defined in
IBeam.Identity.Models. - Used by API and services (requests/responses/domain contracts).
- Examples:
AuthResultResponse,RegisterUserRequest,TenantInfo.
- Entities
- Provider-specific persistence shapes (e.g., Azure Table entities).
- Include storage keys (
PartitionKey,RowKey) and persistence metadata. - Examples in Azure Table provider:
TenantEntity,UserTenantEntity,OtpChallengeEntity.
Azure Table Schema (Current Provider)
ElCamino identity tables
AspNetUsers: base user identities.AspNetRoles: role definitions.AspNetIndex: identity lookup/index support.
IBeam custom identity tables
Tenants: tenant master records.TenantUsers: tenant-to-user membership index.UserTenants: user-to-tenant membership index.TenantRoles: tenant-scoped roles.PermissionRoleMaps: tenant permission mapping to role names/ids.OtpChallenges: OTP lifecycle records (destination, hash, attempts, expiry, consume state).ExternalLogins: OAuth provider-user links.AuthSessions: refresh/session tracking and revocation.Schema: schema version marker for bootstrap.
Table Naming and Prefixing
For Azure Table identity provider, physical table name is:
{TablePrefix}{BaseTableName}
Examples:
TablePrefix = "IBeam"+AspNetUsers⇒IBeamAspNetUsersTablePrefix = "Acme"+TenantUsers⇒AcmeTenantUsers
This applies to both ElCamino and custom IBeam identity tables.
Connection String Resolution Cascade
Current implemented behavior
Azure Table providers currently resolve connection strings with fallback precedence.
- Identity AzureTable provider (
IBeam.Identity.Repositories.AzureTable)
-
IBeam:Identity:AzureTable:StorageConnectionString
-
IBeam:AzureTables
-
IBeam:Repositories:ConnectionString
-
IBeam:ConnectionString
-
ConnectionStrings:AzureTables
-
ConnectionStrings:AzureStorage
-
ConnectionStrings:IBeam
-
ConnectionStrings:DefaultConnection
-
ConnectionStrings:IdentityAzureTable
- Generic AzureTables repository provider (
IBeam.Repositories.AzureTables)
-
IBeam:Repositories:AzureTables:ConnectionString
-
IBeam:AzureTables
-
IBeam:Repositories:ConnectionString
-
IBeam:ConnectionString
-
ConnectionStrings:AzureTables
-
ConnectionStrings:AzureStorage
-
ConnectionStrings:IBeam
-
ConnectionStrings:DefaultConnection
- Identity EntityFramework provider (
IBeam.Identity.Repositories.EntityFramework)
-
{configSectionPath}:ConnectionString(defaultIdentityEf)
-
IBeam:Identity:EntityFramework:ConnectionString
-
IBeam:Repositories:EntityFramework:ConnectionString
-
IBeam:Repositories:ConnectionString
-
IBeam:ConnectionString
-
ConnectionStrings:IdentityEf
-
ConnectionStrings:IdentityEntityFramework
-
ConnectionStrings:IBeam
-
ConnectionStrings:DefaultConnection
Configuration Models Exposed
IBeam:Identity:JwtIBeam:Identity:OtpIBeam:Identity:OAuthIBeam:Identity:FeaturesIBeam:Identity:EventsIBeam:Identity:EmailTemplatesIBeam:Identity:PermissionAccessIBeam:Identity:RoleManagement
Examples
1) API composition in a host app
builder.Services.AddIBeamIdentityApi(builder.Configuration);
builder.Services.AddIBeamIdentityApiControllers();
2) Azure Table identity configuration with prefix and scoped connection
{
"IBeam": {
"Identity": {
"AzureTable": {
"StorageConnectionString": "UseDevelopmentStorage=true",
"TablePrefix": "Acme",
"UserTableName": "AspNetUsers",
"RoleTableName": "AspNetRoles",
"IndexTableName": "AspNetIndex"
}
}
}
}
3) Fallback-only configuration (top-level IBeam connection)
{
"IBeam": {
"ConnectionString": "UseDevelopmentStorage=true"
}
}
With AzureTable providers, this can be used when deeper scoped keys are not supplied.
4) Service role access example
[RoleAccess("SavePatient")]
public sealed class PatientService
{
private readonly IRoleAccessAuthorizer _roleAccess;
public PatientService(IRoleAccessAuthorizer roleAccess)
{
_roleAccess = roleAccess;
}
public Task SavePatientAsync(ClaimsPrincipal user, CancellationToken ct = default)
{
_roleAccess.EnsureAuthorizedForCurrentMethod(user, this);
return Task.CompletedTask;
}
}
| 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 IBeam.Identity:
| Package | Downloads |
|---|---|
|
IBeam.Identity.Services
IBeam modular framework components for .NET APIs and services. |
|
|
IBeam.Identity.Repositories.EntityFramework
IBeam modular framework components for .NET APIs and services. |
GitHub repositories
This package is not used by any popular GitHub repositories.