{
  "version": 1,
  "fileId": "file:17v8pus:authenticationheaderhandler-cs",
  "fingerprint": "wudfcr",
  "path": "NexusReader.Web.Client/Handlers/AuthenticationHeaderHandler.cs",
  "absolutePath": "c:/Users/micht/source/repos/Nexus.Reader/src/NexusReader.Web.Client/Handlers/AuthenticationHeaderHandler.cs",
  "shortLabel": "AuthenticationHeaderHandler",
  "longLabel": "NexusReader.Web.Client/Handlers/AuthenticationHeaderHandler.cs",
  "purpose": "A HTTP DelegatingHandler for the client that appends stored JWTs to trusted requests, forces browser credentials for SSR, and transparently refreshes expired tokens in a thread-safe manner.",
  "classification": {
    "role": "handler",
    "layer": "infrastructure",
    "confidence": 0.9,
    "evidence": [
      "Integration/client pattern",
      "Application/service path heuristic",
      "class AuthenticationHeaderHandler : DelegatingHandler",
      "appends Authorization header and performs token refresh via IIdentityService"
    ]
  },
  "className": "AuthenticationHeaderHandler",
  "domainConcepts": [
    "Authentication",
    "JWT",
    "Token refresh",
    "Secure storage"
  ],
  "patterns": [
    "HTTP DelegatingHandler",
    "Token auto-refresh",
    "Scoped resolution for short-lived services",
    "Concurrency serialization (Semaphore)"
  ],
  "keyDetails": "Appends JWT only for trusted origins and non-auth endpoints; transparently attempts refresh on 401 using a semaphore to avoid duplicate refreshes; resolves IIdentityService in an explicit scope and will call LogoutAsync on refresh failure; clones HttpRequestMessage to safely retry requests with new token.",
  "coverage": {
    "symbolCount": 4,
    "executableSymbolCount": 2,
    "executableSymbolsWithControlFlowCount": 2,
    "groundedEdgeCount": 4,
    "unresolvedReferenceCount": 16,
    "controlFlowFragmentCount": 2,
    "unresolvedJumpCount": 5,
    "unsupportedConstructCount": 0,
    "controlFlowCoverage": 1,
    "requiredDiagramCount": 2,
    "generatedDiagramCount": 4,
    "missingRequiredDiagramCount": 0
  }
}