Skip to main content

Overview

Multi-issuer JWT/OIDC token validation for .NET applications. Supports Azure AD, Auth0, Okta, Cognito, and local JWT with a unified API.

Decision guide

  • Use Identity Validator if your API already receives JWTs and you only need to validate them.
  • Use Identity Broker if you need login UI and secure cookie sessions for a browser app (BFF).
  • Use both if you have a browser app plus downstream APIs.

See: Identity Broker Overview

Why Use Identity Validator?

Integrating authentication across multiple identity providers is complex. Identity Validator provides a unified API for validating tokens from any OIDC-compliant provider.

FeatureStandard ApproachIdentity Validator
Multi-ProviderManual per-provider configUnified API
Token ValidationDIY JWT parsingBuilt-in validation
JWKS DiscoveryManual endpoint callsAutomatic
Claims MappingInconsistentStandardized

Supported Providers


Configuration Reference

These settings apply to every provider. Provider-specific fields are documented on each provider's page.

Top-level PrimusIdentity fields

KeyTypeRequiredDefaultDescription
RequireHttpsMetadataboolNotrueWhen false, allows plain HTTP connections. Set to false in development only — always true in production.
ValidateLifetimeboolNotrueWhen true, rejects tokens that are expired (past exp) or not yet valid (before nbf). Disable only for testing.
ClockSkewstringNo"00:05:00"Maximum allowed clock drift between your server and the token issuer. Format is HH:MM:SS. The default (5 minutes) covers typical NTP drift. Set to "00:00:00" for strict enforcement.
IssuersarrayYesList of trusted identity providers. At least one entry is required. See issuer fields below.

Issuer fields — common to all providers

Every entry in the Issuers array shares these fields regardless of provider type.

KeyTypeRequiredDescription
NamestringYesA friendly label for this issuer. Appears in logs and error messages only — not validated against any token claim.
TypestringYesIdentifies which provider to use. Accepted values: Jwt (Local), AzureAd, Auth0, Okta, Cognito, Google, GitHub
IssuerstringYesThe expected iss claim value in incoming tokens. Must exactly match what the provider puts in the token — even a trailing slash difference will cause IssuerNotConfigured errors.
Audiencesstring[]YesThe expected aud claim value(s). A token is accepted if it matches at least one entry. Typically the URL or URI of your API.
Provider-specific fields

Fields used only by a specific provider (e.g., Secret for Local JWT, Authority for OIDC providers) are documented on each provider's own page.


Result Object

The AddPrimusIdentity() method configures the authentication pipeline. When validation succeeds, the following property is available on HttpContext.User:

PropertyTypeDescription
User.Identity.IsAuthenticatedboolWhether the token is valid

Next Steps

Want to...See Guide
Try it liveInteractive Playground
Use Local JWT (dev)Local JWT
Configure Azure ADAzure AD
Configure Auth0Auth0
Configure OktaOkta
Configure CognitoAWS Cognito
Configure GoogleGoogle
Configure GitHubGitHub Actions