Skip to content

feat(client): add unified ResourceRequest API for protected resources - #110

Merged
mckaragoz merged 6 commits into
CodeBeamOrg:devfrom
mckaragoz:ResourceClient
Oct 26, 2026
Merged

mckaragoz merged 6 commits into
CodeBeamOrg:devfrom
mckaragoz:ResourceClient

Conversation

@mckaragoz

@mckaragoz mckaragoz commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Description

Closes #95

Introduces a unified Resource API client for authenticated HTTP requests, extending IUAuthClient beyond authentication and identity operations to protected application resources.

Changes

  • Add IUAuthClient.Resource with GET, POST, PUT, PATCH, and DELETE support.
  • Support configurable Resource API origins and browser credential policies.
  • Reuse UAuthResult<T> for consistent response and error handling.
  • Implement browser-based transport with origin validation, redirect protection, and request cancellation.
  • Automatically propagate device and client profile metadata.

Additional Fixes

  • Strengthen authentication request origin validation for same-origin and separate UAuthHub deployments.
  • Improve client bootstrap, authentication state, and login page discovery behavior.
  • Update sample applications to use the unified Resource API.
  • Add unit and JavaScript regression tests covering resource requests, client configuration, and related lifecycle behavior.

Notes

  • Resource requests use the browser transport in Blazor applications.
  • Automatic refresh and retry after a 401 response are not included in this PR.
  • Resource API authentication and authorization remain enforced by the receiving server.

@codecov-commenter

codecov-commenter commented Oct 26, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 81.67939% with 24 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.71%. Comparing base (f586988) to head (482d11b).
⚠️ Report is 1 commits behind head on dev.

Files with missing lines Patch % Lines
...lazor/Infrastructure/UAuthResourceRequestClient.cs 74.35% 10 Missing ⚠️
...t.Blazor/Infrastructure/UAuthLoginPageDiscovery.cs 0.00% 7 Missing ⚠️
...Client.Blazor/Infrastructure/UAuthRequestClient.cs 66.66% 3 Missing and 1 partial ⚠️
...ltimateAuth.Client/Services/UAuthResourceClient.cs 94.11% 1 Missing and 1 partial ⚠️
...deBeam.UltimateAuth.Client/Services/UAuthClient.cs 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #110      +/-   ##
==========================================
+ Coverage   86.11%   86.71%   +0.59%     
==========================================
  Files         673      678       +5     
  Lines       18464    18578     +114     
  Branches     2255     2270      +15     
==========================================
+ Hits        15900    16109     +209     
+ Misses       1812     1726      -86     
+ Partials      752      743       -9     

☔ 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 13e22f3 into CodeBeamOrg:dev Oct 26, 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.

[Design]: Unified ResourceRequest API for UltimateAuth-Protected Resources

2 participants