Skip to content

[Feature]: Expose session count in SessionChainSummary #123

Description

@mckaragoz

Description

SessionChainSummary currently exposes chain information such as ActiveSessionId, RotationCount, and TouchCount, but does not provide the number of sessions associated with a chain.

Adding SessionCount would help clients visualize session lineage and understand how many authentication sessions have existed within each chain.

Proposed Design

Add a property to SessionChainSummary:

public int SessionCount { get; init; }

Requirements

  • Return the total number of session records belonging to the chain, including historical and rotated sessions.
  • Keep SessionCount distinct from RotationCount and active session status.
  • Populate the count consistently across supported persistence implementations.
  • Avoid N+1 queries when listing multiple chains.
  • Preserve existing API compatibility.
  • Add tests covering initial sessions, rotation, revocation, and multiple chains.

Usage

Clients such as Identity Lab can display the count directly in the authentication hierarchy:

Sessions (3)

The count should be available through existing chain summary responses without requiring additional API calls.

Activity

  1. added this to the v0.2.0 milestone on Oct 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