Identity
Packages
Section titled “Packages”| Package | Maturity | What it brings |
|---|---|---|
Cephalon.Identity | M2 | Host-agnostic identity + authorization primitives. Principal model, scope/role decisions, claim contracts. |
Cephalon.Identity.AspNetCore | M2 | AspNetCore adapter — wires the principal from the HTTP context, plugs into the behavior pipeline. |
Cephalon.Audit | M2 | Host-agnostic audit recording + runtime catalog. Tamper-evident audit trail. |
Cephalon.Audit.EntityFramework | M2 | EF-backed durable audit storage. |
How to enable
Section titled “How to enable”{ "Engine": { "Identity": { "Enabled": true, "Provider": "Bearer", "Authority": "https://login.acme.example/" }, "Audit": { "Enabled": true, "Provider": "EntityFramework" } }}builder.Services .AddCephalonAspNetCore() .AddIdentity(options => options.UseBearer("https://login.acme.example/")) .AddAudit(options => options.UseEntityFramework<AuditDbContext>()) .AddModulesFromAssemblies(/* ... */);Behavior-level authorisation
Section titled “Behavior-level authorisation”public RestRoute Route => RestRoute.Delete("/products/{id}") .WithRequireScope("products:write") .WithRequireRole("admin");The behavior pipeline rejects unauthorised callers before the handler runs and emits an audit entry with the principal, the failed claim, and the trace context.
Source-doc snapshots
Section titled “Source-doc snapshots”Cross-references
Section titled “Cross-references”- Reference → Configuration → Identity —
Engine:Identityschema, Bearer/Cookie auth, JWT validation, claim mapping. - Reference → Architecture — canonical contracts index (the dedicated Identity contract page is planned for
0.2.0-preview). - Tutorial → Multi-tenant SaaS — identity in a multi-tenant world.