Configures OpenIddict validation for ABP resource servers: token validation, audience, issuer, introspection, local vs remote authority, UseAspNetCore, and ForwardIdentityAuthenticationForBearer.
Ships in abp-authentication. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
The validation side is the resource server: the API host that receives an
access_token on each request, verifies it, and turns it into a
ClaimsPrincipal. This is a separate concern from the OpenIddict server
that issues the tokens (see the configure-openiddict-authentication skill).
ABP wires validation through OpenIddict's OpenIddictValidationBuilder, whose
documented extension methods include AddAudiences() (for resource servers),
SetIssuer(), UseIntrospection(), SetClientId() / SetClientSecret(),
EnableAuthorizationEntryValidation(), EnableTokenEntryValidation(),
UseLocalServer(), and UseAspNetCore().
AddAudiences).UseLocalServer) vs a
remote authority.ForwardIdentityAuthenticationForBearer).app.UseAbpOpenIddictValidation() in the request pipeline.Builder configuration goes in PreConfigureServices. Two equivalent entry points:
// via the top-level OpenIddictBuilder
PreConfigure<OpenIddictBuilder>(builder =>
{
builder.AddValidation(options =>
{
options.AddAudiences("MyProjectName");
options.UseLocalServer();
options.UseAspNetCore();
});
});
// or directly on the validation builder
PreConfigure<OpenIddictValidationBuilder>(options =>
{
// same options...
});
AddValidation() registers the OpenIddict token-validation services (docs:
OpenIddictBuilder → AddValidation() → contains OpenIddictValidationBuilder
configurations).
Use this when the API host is the auth server, or runs in the same process as
the OpenIddict server registration (the non-tiered app templates — HttpApi.Host,
Web, Blazor.Server — do exactly this). UseLocalServer() registers the
validation/server integration so validation reads the in-process server's
keys/config directly — no network call to a discovery endpoint. The snippet under
Where configuration goes above is this exact local pattern.
When the API is a standalone resource server pointing at a remote auth server, there are two ABP-supported patterns:
AddAbpJwtBearer (JWT bearer against a remote authority)This is what the OpenIddict module's standalone API demo does — a separate API
project depending on AbpAspNetCoreAuthenticationJwtBearerModule:
builder.Services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)
.AddAbpJwtBearer(options =>
{
options.Authority = "https://localhost:44301"; // the remote auth server
options.Audience = "MyProjectNameResource";
});
Authority points at the remote OpenIddict server; the middleware fetches its
discovery document / signing keys and validates JWTs against them. AddAbpJwtBearer
is the ABP wrapper over ASP.NET Core's AddJwtBearer.
OpenIddictValidationBuilder against a remote issuerUsing the validation builder with SetIssuer() so it discovers the remote
server's configuration, optionally switching to UseIntrospection() for reference
tokens:
var configuration = context.Services.GetConfiguration();
PreConfigure<OpenIddictValidationBuilder>(options =>
{
options.SetIssuer("https://localhost:44301");
options.AddAudiences("MyProjectNameResource");
// introspection (needed for reference/opaque tokens):
options.UseIntrospection();
options.SetClientId("MyProjectNameResource");
// Read the client secret from a secret-backed provider, never a literal
options.SetClientSecret(configuration["AuthServer:ClientSecret"]);
options.UseSystemNetHttp(); // ⚠️ see note below
options.UseAspNetCore();
});
SetIssuer() — docs: sets the URI used to locate the OAuth 2.0 / OIDC
configuration document via provider discovery.UseIntrospection() — docs: use introspection instead of local/direct
validation.SetClientId() / SetClientSecret() — docs: credentials used when talking to
the remote authorization server (e.g. for introspection).UseSystemNetHttp() is an OpenIddict-native method — add the
OpenIddict.Validation.SystemNetHttp package to use it; it's not an ABP wrapper. It
registers the System.Net.Http client OpenIddict uses to call the remote
discovery / introspection endpoints, so it's needed for remote validation
(remote OIDC discovery or introspection). Use UseLocalServer() when the auth server
is in the same process; a remote API validates against the issuer instead —
with AddAbpJwtBearer (Authority + Audience) or OpenIddict's remote validation. See the
OpenIddict docs: https://documentation.openiddict.comIn UI hosts that also serve APIs (cookie login and bearer API calls),
ForwardIdentityAuthenticationForBearer sends requests carrying an
Authorization: Bearer ... header to the validation scheme instead of the cookie
scheme:
private void ConfigureAuthentication(ServiceConfigurationContext context)
{
context.Services.ForwardIdentityAuthenticationForBearer(
OpenIddictValidationAspNetCoreDefaults.AuthenticationScheme);
}
ForwardIdentityAuthenticationForBearer(jwtBearerScheme = "Bearer") (ABP Identity
extension) sets the application cookie's ForwardDefaultSelector to route bearer
requests to the given scheme.
In OnApplicationInitialization, add app.UseAbpOpenIddictValidation() after
app.UseAuthentication() (as the templates do):
app.UseAuthentication();
app.UseAbpOpenIddictValidation();
// ...
app.UseAuthorization();
UseAbpOpenIddictValidation(schema = OpenIddictValidationAspNetCoreDefaults.AuthenticationScheme)
(ABP middleware) authenticates against the validation scheme and assigns the
resulting principal to HttpContext.User when the request is not already
authenticated.
EnableTokenEntryValidation() — docs: checks the token entry in the database on
each request, giving immediate revocation at the cost of a DB hit per call. Use it
when the API validates locally against the same database; an external API that can't
reach the server's database should use introspection instead. It is not a blanket
requirement just because the server issues reference tokens.EnableAuthorizationEntryValidation() — docs: same idea for the authorization
entry. Both only work with an OpenIddict-based server and add a DB hit per
request (performance cost).UseLocalServer + AddAudiences accept it; a wrong
audience should 401.Authority/SetIssuer at the auth server and confirm the API
reaches its discovery endpoint and validates a token issued by that server.Authorization: Bearer <token> is validated as an API call.AddAudiences must match the token's audience — a mismatch yields 401 even with
a valid signature.UseLocalServer only works when the server lives in the same process; a
standalone API must use a remote pattern (AddAbpJwtBearer or SetIssuer).app.UseAbpOpenIddictValidation() goes after app.UseAuthentication()
and before app.UseAuthorization().EnableTokenEntryValidation / EnableAuthorizationEntryValidation add a DB
query per request — enable only when you need immediate revocation, not just
because the server issues reference tokens.UseSystemNetHttp() is OpenIddict-native (the OpenIddict.Validation.SystemNetHttp
package), not an ABP wrapper — see the OpenIddict docs for its options.https://github.com/abpframework/abp/blob/rel-10.5/docs/en/modules/openiddict.md (OpenIddictValidationBuilder options)https://github.com/abpframework/abp/blob/rel-10.5/modules/openiddict/src/Volo.Abp.OpenIddict.AspNetCore/Microsoft/AspNetCore/Builder/ApplicationBuilderAbpOpenIddictMiddlewareExtension.cs (UseAbpOpenIddictValidation)https://github.com/abpframework/abp/blob/rel-10.5/modules/identity/src/Volo.Abp.Identity.AspNetCore/Microsoft/AspNetCore/Extensions/DependencyInjection/AbpAspNetCoreServiceCollectionExtensions.cs (ForwardIdentityAuthenticationForBearer)https://github.com/abpframework/abp/blob/rel-10.5/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/MyProjectNameHttpApiHostModule.cs (AddValidation + UseLocalServer + UseAspNetCore)https://github.com/abpframework/abp/blob/rel-10.5/modules/openiddict/app/OpenIddict.Demo.API/Program.cs (AddAbpJwtBearer remote authority)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
openiddict, abp, token-validation, resource-server, authentication
3 skills in this plugin
/configure-dynamic-claimsRefresh a user's claims (roles, profile claims, and custom claims added to DynamicClaims) mid-session without re-login — enabling ABP dynamic claims, wiring the middleware, and adding a custom claims contributor in monolith or tiered/microservice setups. (Permissions are not part of the default dynamic-claims set.) USE FOR: IsDynamicClaimsEnabled on AbpClaimsPrincipalFactoryOptions, UseDynamicClaims middleware, RemoteRefreshUrl in tiered apps, IAbpDynamicClaimsPrincipalContributor, IsRemoteRefreshEnabled / WebRemoteDynamicClaimsPrincipalContributorOptions, choosing which DynamicClaims types refresh. DO NOT USE FOR: configuring the auth server itself (token lifetimes, certificates, refresh tokens) — use the configure-openiddict-authentication skill; defining/checking permissions — use the permissions-and-authorization skill; per-entity resource access — use the authorize-resources skill.
/configure-openiddict-authenticationConfigure the ABP OpenIddict auth server — token lifetimes, refresh tokens, PKCE, disabling the HTTPS requirement in dev, and production signing/encryption certificates. USE FOR: OpenIddictServerBuilder / AbpOpenIddictAspNetCoreOptions setup, SetAccessTokenLifetime/SetRefreshTokenLifetime, enabling refresh_token + offline_access, DisableTransportSecurityRequirement, AddProductionEncryptionAndSigningCertificate, access-token encryption, TokenCleanupOptions. DO NOT USE FOR: defining/checking app permissions — use the permissions-and-authorization skill; per-entity resource access — use the authorize-resources skill; refreshing role/profile/custom claims mid-session without re-login — use the configure-dynamic-claims skill.
/abp-authentication:configure-openiddict-validationfrom abp-authentication
npx claudepluginhub abpframework/abp-skills --plugin abp-authenticationOther plugins' skills for the same job