Skip to content

feat: request an offline license from the browser activation flow - #20

Open
TobbenTM wants to merge 1 commit into
mainfrom
ouagadougou-v1
Open

feat: request an offline license from the browser activation flow#20
TobbenTM wants to merge 1 commit into
mainfrom
ouagadougou-v1

Conversation

@TobbenTM

@TobbenTM TobbenTM commented Aug 6, 2026

Copy link
Copy Markdown
Member

The backend now accepts a method query parameter on the activation-request endpoint, so request_activation gains an optional activation_method argument (defaulting to online) that lets a normal browser activation mint an offline license instead.

The parameter is added to the request URL only, never to client_query, which is shared with /validate and /revoke where the backend does not accept it; since the response carries only id/request/browser, the client stamps the requested method onto a new activation_request::method field. Everything downstream was already correct: get_requested_activation does not inspect the method, validate_token_online short-circuits offline licenses and revoke_activation refuses them.

The JUCE bridge exposes the same argument on beginActivation, plus a pendingActivationMethod() accessor so a UI can label the wait. The moonbase_licensing JUCE module is deliberately unchanged (its mirrored headers are re-synced only because CI gates on them), and the defaulted argument keeps all existing call sites source-compatible in this header-only library.

Verified with the core suite (111/111, including 5 new cases covering the offline request URL, the "product does not allow offline activations" 400 mapping, an end-to-end request/poll/no-revalidation/not-revocable flow, and guards that method= does not leak into /validate or /revoke) and the JUCE module suite (50/50, unchanged).

The backend now accepts a `method` query parameter on the activation-request
endpoint, so a normal browser activation can mint an offline license instead
of an online one.

`request_activation` gains an optional `activation_method` argument, defaulting
to online. The parameter is added to the request URL only, never to
`client_query`, which is shared with /validate and /revoke where the backend
does not accept it. The response carries only id/request/browser, so the client
stamps the requested method onto the new `activation_request::method` field.

Everything downstream was already correct: `get_requested_activation` does not
inspect the method, `validate_token_online` short-circuits offline licenses and
`revoke_activation` refuses them.

The JUCE bridge exposes the same argument on `beginActivation`, plus a
`pendingActivationMethod()` accessor so a UI can label the wait. The
moonbase_licensing JUCE module is deliberately unchanged; its mirrored headers
are re-synced because CI gates on them.
@argos-ci

argos-ci Bot commented Aug 6, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) ✅ No changes detected - Aug 6, 2026, 10:52 AM

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.

1 participant