WoW2.Sdk.Beta.Be.Identity.Client
10.0.30-beta
Prefix Reserved
dotnet add package WoW2.Sdk.Beta.Be.Identity.Client --version 10.0.30-beta
NuGet\Install-Package WoW2.Sdk.Beta.Be.Identity.Client -Version 10.0.30-beta
<PackageReference Include="WoW2.Sdk.Beta.Be.Identity.Client" Version="10.0.30-beta" />
<PackageVersion Include="WoW2.Sdk.Beta.Be.Identity.Client" Version="10.0.30-beta" />
<PackageReference Include="WoW2.Sdk.Beta.Be.Identity.Client" />
paket add WoW2.Sdk.Beta.Be.Identity.Client --version 10.0.30-beta
#r "nuget: WoW2.Sdk.Beta.Be.Identity.Client, 10.0.30-beta"
#:package WoW2.Sdk.Beta.Be.Identity.Client@10.0.30-beta
#addin nuget:?package=WoW2.Sdk.Beta.Be.Identity.Client&version=10.0.30-beta&prerelease
#tool nuget:?package=WoW2.Sdk.Beta.Be.Identity.Client&version=10.0.30-beta&prerelease
WoW2.Sdk.Beta.Be.Identity.Client
Forms 2 and 3 of Identity: a product signs in against a running Identity instance. Today it holds the BFF sign-in: an API and its SPA on one origin sign people in by the OpenID Connect code flow with PKCE, keep the tokens server-side and give the SPA session routes.
dotnet add package WoW2.Sdk.Beta.Be.Identity.Client --prerelease
builder.Services.AddIdentityBff(); // Identity:Client — Authority, ClientId, ClientSecret, …
app.UseIdentityBff(); // authentication, the X-Csrf-Token check, authorization
app.MapIdentityBffEndpoints(); // GET /api/identity/session · GET /api/identity/sign-in · POST /api/identity/sign-out
app.MapGroup("/api/orgs/{organizationId:guid}/desks")
.RequireRouteOrganization() // 404 for another organization
.RequirePermission("desk:edit"); // 403 without org_permission desk:edit
- Settings:
Identity:Client—Authority,ClientId,ClientSecret,Scopes(defaultopenid profile email phone offline_access),RoutePrefix(/api/identity),ApiPathPrefixes(/api),PostSignOutRedirectPath(/),SessionLifetime(12 h, only while the instance names no end),AccessTokenRefreshMargin(1 min),CookieName,Environment,SignalUrl(none); code configuration wins. - Session end: the BFF session ends with the instance's sign-in session, whose end each token response names
(
refresh_token_expires_in); a sliding instance session moves it, and the cookie is reissued to follow. - Add the client at the instance with the redirect URI
{origin}/api/identity/callbackand the post-sign-out URI{origin}/(Identity:Server:Clients:N:RedirectUrisandPostSignOutRedirectUris). - The session routes sit under the API prefix:
sessionandsign-outanswer as API calls (sign-outneedsX-Csrf-Token), whilesign-inandcallbackredirect, as a browser navigates to them. - The cookie carries only the session reference; the tokens and claims live in
IBffSessionRepository(the distributed cache by default), keyed on the instance'ssid, encrypted with Data Protection. Several instances share a distributed cache and a Data Protection key ring. - Accepting tokens beside the session:
AddJwtBearerAuthenticationleaves the session cookie the default scheme, whichever registers first; an endpoint taking a token namesJwtBearerDefaults.AuthenticationSchemein its policy. - Calling another service for the person:
AddHttpClient("files").AddOAuth2TokenExchange(…)takes its subject token from the session, with no bearer header needed (service tokens). - A sign-in callback that fails lands back at
returnUrlwithsignInError=callback_failed; for 10 s after it the sign-in route and page redirects answer a 401 problem (codeSignInFailed) instead of starting the sign-in again, so a misconfigured client ends at an error rather than in a redirect loop.
Revocation signals
"Identity": { "Client": { "SignalUrl": "https://desk.example.com/api/identity/signal" } } // the client's SignalUrl at the instance
SignalUrlset mapsPOST {RoutePrefix}/signal, verified through the JWKS ofAuthoritywithSignalUrlas the onlyaudit adds; null maps no route. The route stays out of the antiforgery check: its signature is the check, and no browser sends it. Contract: revocation signals.- A session's end ends the BFF session under that
sid. A changed access records a marker per person inIDistributedCacheforSessionLifetime, since the session store has no index by person, and the person's next request refreshes first, once, so it carries fresh claims. Each request reads this one more cache key. - A refresh the instance refuses still ends the session. A session with no refresh token keeps its tokens until they run out, since a role change signs nobody out.
- A refresh under way undoes neither signal: a session ended meanwhile stays ended, and a change heard meanwhile refreshes once more.
- A sign-in's claims date from before its code exchange, so a change heard during it refreshes too. A session's end heard during it finds no session yet; the first refresh, refused, ends it.
- Only
Authority's own signals reach a session: asidorsubfrom another issuer the host trusts as a resource doesn't. AddIdentityBffregisters the receiver and an in-memory event bus either way, becauseSignalUrlmay come from configuration. A broker registers before it, or it is silently ignored (signals).
Deployed hosts: persist the sessions and the key ring
The defaults (AddDistributedMemoryCache, AddDataProtection with no key store) hold for a local run only: every
restart or deploy forgets the sessions and the keys, so every cookie, CSRF token and sign-in in flight stops working
and everyone signs in again. A deployed host registers both before AddIdentityBff:
builder.Services.AddStackExchangeRedisCache(o => o.Configuration = redisConnection); // or any shared IDistributedCache
builder.Services.AddDataProtection()
.SetApplicationName("ocharo") // one name across instances
.PersistKeysToDbContext<AppDbContext>(); // or PersistKeysToStackExchangeRedis, a volume
builder.Services.AddIdentityBff();
- A deployed boot (
DEPLOY_ENVIRONMENTset) logs a warning for each one still on its default; it never refuses to boot. - Protect the persisted ring at rest (
ProtectKeysWithCertificate) where the store is shared. - API requests answer 401, 403 and 404 RFC 7807 problems with a
code; page requests are redirected to sign in.
Namespace: WoW.Two.Sdk.Beta.Be.Identity.Bff.
| 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
- Microsoft.AspNetCore.Authentication.OpenIdConnect (>= 10.0.3)
- WoW2.Sdk.Beta.Be (>= 10.0.103-beta)
- WoW2.Sdk.Beta.Be.Identity.Auth (>= 10.0.30-beta)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 10.0.30-beta | 214 | 11/8/2026 |
| 10.0.29-beta | 58 | 11/6/2026 |
| 10.0.28-beta | 55 | 11/6/2026 |
| 10.0.27-beta | 77 | 11/5/2026 |
| 10.0.26-beta | 78 | 11/5/2026 |
| 10.0.25-beta | 62 | 11/5/2026 |
| 10.0.24-beta | 116 | 11/3/2026 |
| 10.0.23-beta | 55 | 11/2/2026 |
| 10.0.22-beta | 56 | 11/2/2026 |
| 10.0.21-beta | 67 | 11/2/2026 |
| 10.0.20-beta | 65 | 11/2/2026 |
| 10.0.19-beta | 69 | 11/2/2026 |
| 10.0.18-beta | 68 | 11/2/2026 |
| 10.0.17-beta | 64 | 11/2/2026 |
| 10.0.16-beta | 58 | 11/2/2026 |
| 10.0.15-beta | 62 | 11/2/2026 |
| 10.0.14-beta | 69 | 11/1/2026 |
| 10.0.13-beta | 68 | 11/1/2026 |
| 10.0.12-beta | 61 | 11/1/2026 |
| 10.0.11-beta | 61 | 11/1/2026 |