Skip to content

[Design]: Unify Credential Resolution and Remove Legacy SessionResolution Options #182

Description

@mckaragoz

Background

UltimateAuth currently maintains two separate credential resolution mechanisms:

  • TransportCredentialResolver, which respects the effective authentication mode and grant delivery configuration.
  • CompositeSessionIdResolver, which relies on configurable resolver precedence through SessionResolution options.

These mechanisms can resolve different credentials from the same request, resulting in inconsistent behavior between ASP.NET Core authentication and UltimateAuth's flow-based authentication.

This issue became particularly apparent during the automatic refresh implementation in #181, where a Hybrid request containing both a session cookie and a JWT access token could resolve the wrong session credential.

Objective

Establish GrantDelivery as the single source of truth for credential transport and resolution across all authentication modes and application profiles.

Credential resolution should be deterministic rather than based on probing multiple transport channels in a configurable order.

Expected Behavior

Authentication Mode Primary Credential Resolution Source
PureOpaque Opaque session Session delivery
Hybrid Opaque session Session delivery
SemiHybrid Access token Access token delivery
PureJwt JWT access token Access token delivery

Scope

  • Unify credential resolution across ASP.NET Core authentication and flow-based authentication.
  • Consolidate session resolution into the existing transport credential resolution infrastructure.
  • Remove legacy SessionResolution options and associated validators.
  • Remove obsolete session ID resolvers and resolver precedence logic.
  • Remove query-string-based session credential resolution.
  • Respect effective authentication modes, application profiles, and grant delivery configurations.
  • Ensure configured cookie names, header names, and header formats are consistently respected.
  • Review Resource API, remote validation, refresh, logout, and middleware dependencies.
  • Eliminate redundant credential resolution and unnecessary DI registrations.
  • Update tests, samples, documentation, and migration guidance.

Acceptance Criteria

  • GrantDelivery is the single source of truth for credential transport.
  • PureOpaque and Hybrid share the same session credential resolution mechanism.
  • ASP.NET Core authentication and flow-based authentication resolve credentials consistently.
  • Hybrid requests containing both a session cookie and a JWT access token resolve the correct primary credential.
  • Credentials are not implicitly resolved from unconfigured transport channels.
  • Session credentials are no longer accepted through query parameters.
  • PureJwt remains fully stateless without server-side session resolution.
  • Resource API and remote validation remain compatible.
  • Login, validation, refresh, logout, and authenticated plugin endpoints work across all supported modes.
  • Obsolete options, implementations, and DI registrations are removed.
  • Regression tests cover credential conflicts and custom delivery configurations.
  • Breaking changes are documented in the v0.2.0 migration guide.

Out of Scope

  • Introducing new authentication modes.
  • Introducing new credential formats.
  • Redesigning session lifecycle or token issuance.
  • Extending automatic refresh functionality.

Activity

  1. added this to the v0.2.0 milestone on Nov 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions