Skip to content

feat: add async authentication authority and policy evaluation - #107

Merged
mckaragoz merged 2 commits into
CodeBeamOrg:devfrom
mckaragoz:AuthModulesAsync
Oct 25, 2026
Merged

mckaragoz merged 2 commits into
CodeBeamOrg:devfrom
mckaragoz:AuthModulesAsync

Conversation

@mckaragoz

Copy link
Copy Markdown
Contributor

Summary

Extend async authorization evaluation to the authentication pipeline, aligning it with the access authority architecture introduced in #106.

  • Add DecideAsync support to IAuthAuthority, IAuthorityPolicy, and IAuthorityInvariant.
  • Convert AuthAuthority and built-in invariants to asynchronous evaluation.
  • Update UAuthSessionOrchestrator to await authority decisions.
  • Propagate CancellationToken throughout the authentication decision pipeline.
  • Preserve backward compatibility for synchronous policy and invariant implementations through obsolete methods.
  • Update tests to cover asynchronous evaluation and existing authentication behavior.

This enables asynchronous authentication policies and invariants without changing the existing decision semantics.

@codecov-commenter

codecov-commenter commented Oct 25, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 65.51724% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.10%. Comparing base (6723566) to head (0b7f8ac).

Files with missing lines Patch % Lines
...Auth.Core/Abstractions/Authority/IAuthAuthority.cs 0.00% 2 Missing ⚠️
...th.Core/Abstractions/Authority/IAuthorityPolicy.cs 0.00% 2 Missing ⚠️
...nfrastructure/Authority/ExpiredSessionInvariant.cs 50.00% 2 Missing ⚠️
...Core/Abstractions/Authority/IAuthorityInvariant.cs 50.00% 1 Missing ⚠️
...nfrastructure/Authority/DeviceRequiredInvariant.cs 66.66% 1 Missing ⚠️
...ture/Authority/InvalidOrRevokedSessionInvariant.cs 75.00% 1 Missing ⚠️
...nfrastructure/Authority/TenantResolvedInvariant.cs 80.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #107      +/-   ##
==========================================
+ Coverage   86.08%   86.10%   +0.02%     
==========================================
  Files         668      671       +3     
  Lines       18389    18401      +12     
  Branches     2247     2247              
==========================================
+ Hits        15830    15845      +15     
+ Misses       1809     1808       -1     
+ Partials      750      748       -2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mckaragoz
mckaragoz merged commit bac7b82 into CodeBeamOrg:dev Oct 25, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants