Class RedbIdentityOptions

Assembly: redb.Identity.Core.dll

Configuration options for redb.Identity.

public class RedbIdentityOptions

Inheritance

Object→RedbIdentityOptions

Properties

AccessTokenLifetime

Access token lifetime. Default: 1 hour.

public TimeSpan AccessTokenLifetime { get; set; }

AccountScope

OAuth scope granting self-service access to the management API (B8).

public string AccountScope { get; set; }

AdminScopeEntitlement

Role-driven entitlement for administrative scopes — the user-side half of the scope check that

public AdminScopeEntitlementOptions AdminScopeEntitlement { get; set; }

AllowEphemeralKeys

When true, allows AddRedbIdentityServer to fall back to ephemeral signing /

public bool AllowEphemeralKeys { get; set; }

AllowLoopbackRedirectPortWildcard

RFC 8252 §7.3 — accept any port on a client's registered loopback redirect URI.

public bool AllowLoopbackRedirectPortWildcard { get; set; }

AuthorizationCodeLifetime

Authorization code lifetime. Default: 5 minutes.

public TimeSpan AuthorizationCodeLifetime { get; set; }

BackchannelLogout

Which addresses a client's backchannel_logout_uri may point at, checked at registration and before

public BackchannelLogoutOptions BackchannelLogout { get; set; }

Bootstrap

B1 — emergency local-admin bootstrap endpoint (POST /internal/bootstrap-admin).

public BootstrapOptions Bootstrap { get; set; }

ChangeEmail

N-4 (Session E, sub-step N4-7): tunables + feature gate for the strict

public ChangeEmailOptions ChangeEmail { get; set; }

ClientKeys

How the server fetches a client's JWKS from its jwks_uri — SSRF limits,

public ClientKeysOptions ClientKeys { get; set; }

ConsentPath

Path to the consent page. Used for redirect when consent_required on authorize.

public string ConsentPath { get; set; }

Cookies

C9 — cookie security defaults: __Host-/__Secure- name prefixes,

public IdentityCookieOptions Cookies { get; set; }

CustomCss

Extra CSS injected into every identity page (login, consent, logout).

public string? CustomCss { get; set; }

DataProtection

C10 — at-rest encryption for the ASP.NET DataProtection key-ring stored in redb PROPS.

public DataProtectionOptions DataProtection { get; set; }

DefaultAccessTokenAudience

The OP's own audience for access tokens (RFC 9068 §3 default resource indicator).

public string? DefaultAccessTokenAudience { get; set; }

Delivery

Webhook delivery through the outbox: polling, parallelism, lease and the subscription cache.

public DeliveryOptions Delivery { get; set; }

DeviceCodeLifetime

Lifetime of the device_code / user_code pair.

public TimeSpan DeviceCodeLifetime { get; set; }

DeviceCodePollingInterval

Polling interval in seconds returned to the client in the device authorization response.

public int DeviceCodePollingInterval { get; set; }

DisableAccessTokenEncryption

Issue access tokens as plain JWS (signed, not encrypted). Only access tokens: authorization codes,

public bool DisableAccessTokenEncryption { get; set; }

Dpop

Z4 (RFC 9449): DPoP support — proof-of-possession-bound access tokens.

public DpopOptions Dpop { get; set; }

DynamicRegistrationAllowedGrantTypes

Grant types allowed for dynamically registered clients.

public string[] DynamicRegistrationAllowedGrantTypes { get; set; }

DynamicRegistrationAllowedScopes

Scopes allowed for dynamically registered clients.

public string[] DynamicRegistrationAllowedScopes { get; set; }

DynamicRegistrationInitialAccessToken

Optional initial access token (RFC 7591 §1.2). When set, the POST /connect/register

public string? DynamicRegistrationInitialAccessToken { get; set; }

DynamicRegistrationThrottleMaxPerPeriod

Per-IP throttle for the Dynamic Client Registration endpoint: max requests per

public int DynamicRegistrationThrottleMaxPerPeriod { get; set; }

DynamicRegistrationThrottlePeriod

Window for . Default: 10 seconds.

public TimeSpan DynamicRegistrationThrottlePeriod { get; set; }

EmailVerification

N-4 (Session C, sub-step N4-6): tunables + feature gate for the e-mail-verification

public EmailVerificationOptions EmailVerification { get; set; }

EnablePasswordFlow

Enable the ROPC grant (grant_type=password). Opt-in only.

public bool EnablePasswordFlow { get; set; }

EnableTokenExchange

Enable the Token Exchange grant (grant_type=urn:ietf:params:oauth:grant-type:token-exchange).

public bool EnableTokenExchange { get; set; }

EncryptionCredentials

Encryption credentials for token payloads. When empty, ephemeral keys are used (dev only).

public List<EncryptingCredentials> EncryptionCredentials { get; set; }

Features

Cross-module feature toggles. Proxy onto ..

public IdentityFeatureFlags Features { get; set; }

FederationProviders

Configured external OIDC federation providers.

public List<FederationProviderConfig> FederationProviders { get; set; }

FederationState

Hardening knobs for the OIDC federation state parameter (anti-replay, browser-binding, TTL).

public FederationStateOptions FederationState { get; set; }

Idempotency

E2 — Idempotency-Key response cache for admin/SCIM mutations. See

public IdempotencyOptions Idempotency { get; set; }

IdempotencyCleanupBatchSize

Records deleted per batch by the idempotency record cleanup. A run deletes batch after batch until no

public int IdempotencyCleanupBatchSize { get; set; }

IdempotencyCleanupInterval

Interval between cleanup runs that delete idempotency records whose time to live

public TimeSpan IdempotencyCleanupInterval { get; set; }

IdentityTokenLifetime

Identity token lifetime. Default: 5 minutes.

public TimeSpan IdentityTokenLifetime { get; set; }

Issuer

Issuer URI for the identity server (appears in iss claim and discovery document).

public Uri Issuer { get; set; }

Jar

Z7 (RFC 9101): JWT-Secured Authorization Request. Effective only when

public JarOptions Jar { get; set; }

LoginPath

Path to the login page. Used for redirect when login_required on authorize.

public string LoginPath { get; set; }

LoginTitle

Title shown on the login page. Default: Sign In.

public string LoginTitle { get; set; }

LogoUrl

URL of a logo image shown above the login form. When null, no logo is rendered.

public string? LogoUrl { get; set; }

ManagementScope

Required OAuth scope for management API access.

public string ManagementScope { get; set; }

MfaLockoutClockSkew

Tolerance (clock skew) applied to MFA lockout-window comparisons (B9 / BUG-5).

public TimeSpan MfaLockoutClockSkew { get; set; }

MfaOtpCleanupInterval

B3: interval between automatic cleanup runs for expired server-side MFA OTP rows

public TimeSpan MfaOtpCleanupInterval { get; set; }

MfaPath

Path to the MFA verification page. Used for redirect when MFA is required after login.

public string MfaPath { get; set; }

MfaRecoveryPath

Path to the MFA recovery code page.

public string MfaRecoveryPath { get; set; }

MintingKeySource

Which key source signs and encrypts new tokens when both /

public MintingKeySource? MintingKeySource { get; set; }

OtpCooldown

Minimum delay between consecutive OTP send requests (SMS/Email).

public TimeSpan OtpCooldown { get; set; }

OtpMaxPerHour

Maximum OTP sends per user per rolling hour (SMS/Email combined).

public int OtpMaxPerHour { get; set; }

PasswordHashing

C12 — password hashing algorithm + parameters for newly stored passwords, and

public PasswordHashingOptions PasswordHashing { get; set; }

PasswordPolicy

H10 — server-side password policy: length, composition, history reuse,

public PasswordPolicyOptions PasswordPolicy { get; set; }

PasswordRecovery

N-4 (Session C): tunables for the anonymous password-recovery flow (TTL etc.).

public PasswordRecoveryOptions PasswordRecovery { get; set; }

PrimaryColor

Primary color for buttons and accents (CSS color value). Default: #2563eb.

public string PrimaryColor { get; set; }

PrimaryColorHover

Primary color hover state. Default: #1d4ed8.

public string PrimaryColorHover { get; set; }

PushedAuthorizationRequestLifetime

Z6: lifetime of a request_uri issued by the PAR endpoint. RFC 9126 §2.2 mandates

public TimeSpan PushedAuthorizationRequestLifetime { get; set; }

RateLimit

Configuration for the C1 rate-limit guard sitting in front of /connect/token,

public RateLimitOptions RateLimit { get; set; }

RecoveryCodePbkdf2Iterations

PBKDF2-HMAC-SHA256 work factor (iterations) used when hashing newly generated recovery

public int RecoveryCodePbkdf2Iterations { get; set; }

RecoveryCodePepper

Server-wide pepper applied to recovery-code hashing in addition to the per-user salt

public string? RecoveryCodePepper { get; set; }

RecoveryCodePreviousPeppers

Earlier values of , kept so that a rotation does not void what was issued

public string[]? RecoveryCodePreviousPeppers { get; set; }

RedbInstanceName

Named redb instance to use. When null or empty, resolves default IRedbService.

public string? RedbInstanceName { get; set; }

RefreshTokenLifetime

Refresh token lifetime. Default: 14 days.

public TimeSpan RefreshTokenLifetime { get; set; }

RefreshTokenReuseLeeway

Refresh token reuse leeway. After rotation, the old token remains valid for this window.

public TimeSpan RefreshTokenReuseLeeway { get; set; }

Registration

N-3 (sub-step N3-7): feature gate + tunables for the anonymous self-service

public RegistrationOptions Registration { get; set; }

RequirePkce

Require Proof Key for Code Exchange (PKCE) on EVERY authorization_code request.

public bool RequirePkce { get; set; }

RequirePushedAuthorizationRequests

Z6 (RFC 9126 §2.1): when true, the authorization endpoint REJECTS requests

public bool RequirePushedAuthorizationRequests { get; set; }

ReverseProxies

Whitelist of trusted reverse-proxy IPs / networks consulted by

public ReverseProxyOptions ReverseProxies { get; set; }

RevokedSidsCleanupInterval

W6-0: interval between cleanup runs that purge expired entries from the

public TimeSpan RevokedSidsCleanupInterval { get; set; }

RevokedSidsMaxRetention

W6-0: maximum lifetime of an entry in the backchannel revoked-sids list. Server clamps

public TimeSpan RevokedSidsMaxRetention { get; set; }

ScimBulkMaxOperations

H1: maximum number of operations accepted in one SCIM Bulk request. Mirrors the

public int ScimBulkMaxOperations { get; set; }

ScimBulkMaxPayloadSize

H1: maximum payload size (bytes) accepted in one SCIM Bulk request. Mirrors the

public int ScimBulkMaxPayloadSize { get; set; }

ScimScope

Required OAuth scope for SCIM API access.

public string ScimScope { get; set; }

ScopeRequiredGroups

Group-membership gate for selected OAuth scopes. Maps

public Dictionary<string, string> ScopeRequiredGroups { get; set; }

SeedAdmin

Default-credential seeder for the well-known admin user that ships

public SeedAdminOptions SeedAdmin { get; set; }

SeedBackchannelClient

W6-0 — default seeder for the client_credentials service-account

public SeedBackchannelClientOptions SeedBackchannelClient { get; set; }

SeedWebClient

Default OIDC-client seeder that ensures the canonical Web Console client

public SeedWebClientOptions SeedWebClient { get; set; }

SessionAbsoluteTimeout

S-track: absolute timeout regardless of activity. A session whose

public TimeSpan SessionAbsoluteTimeout { get; set; }

SessionCleanupInterval

Interval between automatic session cleanup runs.

public TimeSpan SessionCleanupInterval { get; set; }

SessionCookieLifetime

Lifetime of the session cookie. After this the user must log in again.

public TimeSpan SessionCookieLifetime { get; set; }

SessionIdleTimeout

S-track: idle timeout. A session whose LastAccessedAt is older

public TimeSpan SessionIdleTimeout { get; set; }

SessionRetentionDays

Retention period (days) for revoked sessions before cleanup deletes them.

public int SessionRetentionDays { get; set; }

Shared

Cross-module shared options (Issuer + Features). Single source of truth

public IdentitySharedOptions Shared { get; set; }

SigningCredentials

Signing credentials for JWT tokens. When empty, ephemeral keys are used (dev only).

public List<SigningCredentials> SigningCredentials { get; set; }

Smtp

N-4 (Session C): outbound SMTP transport used by the transactional e-mail channel

public SmtpOptions Smtp { get; set; }

TokenCleanupBatchSize

Batch size for soft-delete purge operations in Services.BackgroundDeletionService.

public int TokenCleanupBatchSize { get; set; }

TokenCleanupInterval

Interval between automatic token cleanup runs.

public TimeSpan TokenCleanupInterval { get; set; }

TokenExchangeAllowImpersonation

Allow impersonation token exchange (the actor disappears — the new token looks like

public bool TokenExchangeAllowImpersonation { get; set; }

TokenExchangeMaxDelegationDepth

Maximum depth of the act claim delegation chain.

public int TokenExchangeMaxDelegationDepth { get; set; }

TokenRetentionDays

Retention period (days) for expired/revoked tokens before cleanup deletes them.

public int TokenRetentionDays { get; set; }

TokenThrottleMaxPerPeriod

Token endpoint throttle: max requests per period per client.

public int TokenThrottleMaxPerPeriod { get; set; }

TokenThrottlePeriod

Token endpoint throttle period.

public TimeSpan TokenThrottlePeriod { get; set; }

UsePropsSigningKeyStore

A3: when true, OpenIddict signing / encryption credentials are populated from

public bool UsePropsSigningKeyStore { get; set; }

Validation

Length / size limits applied by management & registration processors when validating

public IdentityValidationOptions Validation { get; set; }

WebAuthn

MFA-3: WebAuthn (FIDO2 / Passkey) configuration. Disabled by default; set

public IdentityWebAuthnOptions WebAuthn { get; set; }

XmlRepositoryRefreshInterval

Interval at which each replica reloads the DataProtection XML key-ring snapshot

public TimeSpan XmlRepositoryRefreshInterval { get; set; }

Methods

ResolveDefaultAccessTokenAudience(Uri, string?)

Resolves the effective OP audience: a configured value wins (trimmed), otherwise

public static string ResolveDefaultAccessTokenAudience(Uri issuer, string? configured)