Update XML endpoint — Joomla-compatible update server with DLID validation #621

Open
opened 2026-06-12 07:58:38 +00:00 by jmiller · 1 comment
Owner

Phase 2.1 — Joomla Update Server

Parent: #616 | Depends on: #618, #619, #620 | Blocks: #628

routers/api/v1/licensing/updates.go:

Route

GET /api/v1/licensing/updates/{product}.xml?dlid=XXX&domain=YYY

Flow

  1. Parse product code from URL path (e.g., restaurant.xml -> restaurant)
  2. Parse DLID from query string
  3. Validate DLID format (CRC32 check)
  4. Look up license by DLID
  5. Check license status (active) and expiry
  6. Check entitlement for requested product code
  7. Auto-activate domain if provided and under limit
  8. If valid: return Joomla-compatible update XML with signed download URL
  9. If invalid: return empty updates XML (Joomla handles gracefully)

Response format (Joomla update XML)

<?xml version="1.0" encoding="utf-8"?>
<updates>
  <update>
    <name>MokoSuite Restaurant</name>
    <version>01.01.00</version>
    <tag>stable</tag>
    <downloadurl type="full" format="zip">
      https://git.mokoconsulting.tech/api/v1/licensing/download/restaurant/01.01.00.zip?token=SIGNED_TOKEN
    </downloadurl>
    <targetplatform name="joomla" version="6.[0-9]" />
    <php_minimum>8.3</php_minimum>
  </update>
</updates>

Acceptance criteria

  • Returns valid Joomla update XML that Joomla's updater can parse
  • Invalid/expired/revoked DLID returns empty updates (no error, Joomla expects this)
  • Missing entitlement returns empty updates
  • Domain auto-activated on first valid check
  • Versions pulled from actual Gitea releases on the corresponding repo
## Phase 2.1 — Joomla Update Server Parent: #616 | Depends on: #618, #619, #620 | Blocks: #628 `routers/api/v1/licensing/updates.go`: ### Route `GET /api/v1/licensing/updates/{product}.xml?dlid=XXX&domain=YYY` ### Flow 1. Parse product code from URL path (e.g., `restaurant.xml` -> `restaurant`) 2. Parse DLID from query string 3. Validate DLID format (CRC32 check) 4. Look up license by DLID 5. Check license status (active) and expiry 6. Check entitlement for requested product code 7. Auto-activate domain if provided and under limit 8. If valid: return Joomla-compatible update XML with signed download URL 9. If invalid: return empty updates XML (Joomla handles gracefully) ### Response format (Joomla update XML) ```xml <?xml version="1.0" encoding="utf-8"?> <updates> <update> <name>MokoSuite Restaurant</name> <version>01.01.00</version> <tag>stable</tag> <downloadurl type="full" format="zip"> https://git.mokoconsulting.tech/api/v1/licensing/download/restaurant/01.01.00.zip?token=SIGNED_TOKEN </downloadurl> <targetplatform name="joomla" version="6.[0-9]" /> <php_minimum>8.3</php_minimum> </update> </updates> ``` ### Acceptance criteria - [ ] Returns valid Joomla update XML that Joomla's updater can parse - [ ] Invalid/expired/revoked DLID returns empty updates (no error, Joomla expects this) - [ ] Missing entitlement returns empty updates - [ ] Domain auto-activated on first valid check - [ ] Versions pulled from actual Gitea releases on the corresponding repo
Author
Owner

Branch created: feature/621-update-xml-endpoint-joomla-compatible-up

git fetch origin
git checkout feature/621-update-xml-endpoint-joomla-compatible-up
Branch created: [`feature/621-update-xml-endpoint-joomla-compatible-up`](https://code.mokoconsulting.tech/MokoConsulting/MokoGitea-APP/src/branch/feature/621-update-xml-endpoint-joomla-compatible-up) ```bash git fetch origin git checkout feature/621-update-xml-endpoint-joomla-compatible-up ```
Sign in to join this conversation.