endorser-authentication #2

Merged
jose merged 6 commits from endorser-authentication into master 2026-07-16 12:32:40 +00:00
6 Commits
Author SHA1 Message Date
Jose Olarte III 9634c3422e docs: document Endorser auth flow and ENDORSER_URL
Describe when register/refresh verify with Endorser, keep the testMode bypass notes, and list ENDORSER_URL in the env table.
2026-07-10 21:09:22 +08:00
Jose Olarte III 2343cece5c fix(auth): distinguish Endorser unavailability from auth rejection
Return 503 when Endorser cannot be reached and keep 401 for rejected JWTs, with clearer server-side diagnostics and generic client messages.
2026-07-10 19:06:40 +08:00
Jose Olarte III f2f0732ef5 feat(auth): share Endorser verification across register and refresh
Extract requireEndorserAuth middleware and apply it to /notifications/refresh so both endpoints use the same check while keeping the local test bypass.
2026-07-10 18:58:52 +08:00
Jose Olarte III 764c89c071 feat(auth): require Endorser verification on device registration
Gate /notifications/register on Endorser JWT acceptance while leaving the local testMode bypass unchanged.
2026-07-10 18:44:35 +08:00
Jose Olarte III e5415280bd feat(endorser): add client helper to check JWT via rateLimits
Introduce checkAuth so callers can verify Endorser acceptance of a JWT without dealing with HTTP details.
2026-07-10 18:05:16 +08:00
Jose Olarte III 0758c4192f feat(config): add ENDORSER_URL for upcoming Endorser auth
Expose the Endorser API base URL from the environment (defaulting to production) so later auth work can call it without hardcoding.
2026-07-10 16:09:57 +08:00