qoder 0.2.17: native daily check-in through auth.checkin (#179)
Adds auth.checkin to Qoder and Qoder CN. It lists the account's campaigns and claims a CLAIMABLE CLAIM_BENEFIT campaign, and the list and the claim go through the plugin's own campaigns path: device token, one rotation on 401/403, VPC host and native machine identity. The outcomes match magpie's built-in qoder_checkin.go: - a CLAIMED campaign is done only while its startAt/endAt window is open; - a daily campaign that is neither claimable nor active-claimed is failed, so it is asked again later; - no daily campaign at all is inactive; - a list or claim reply that can't be read is failed, never inactive or claimed. The credit is the claim's own benefit.amount, else the campaign's. Bumps the package to 0.2.17. Reviewed head 128ed2a. Ran at that head: - bun test in packages/qoder, sandbox HOME/TMPDIR: 127 pass, 0 fail - git merge-tree onto origin/main: clean - PR CI: test and on-npm pass - read every line of the checkin hook against magpie's internal/provider/qoder_checkin.go. The campaign shape and its seconds-based startAt/endAt match the real campaign JSON in qoder_checkin_test.go.
This commit is contained in:
@@ -201,7 +201,10 @@ The hosts and reply shapes come from a real VPC account's report
|
||||
Qoder gives credits for a daily claim (the Qoder client's campaign
|
||||
`CLAIM_BENEFIT`, 100 Credits a day as reported), on both sites. magpie can
|
||||
claim it for each account when its Qoder check-in switch is on
|
||||
(Settings). It asks these pages through this plugin's fetch (since 0.2.7),
|
||||
(Settings), through `auth.checkin`: an already claimed campaign is `done`,
|
||||
a campaign not available is `inactive`, and a claimable one is `claimed`
|
||||
with its benefit amount. It asks these pages through this plugin's own
|
||||
campaigns path (since 0.2.7),
|
||||
which sends them as the account, on the device token (`Bearer`,
|
||||
`Cosy-ClientType: 10`) as usage is read; a refused device token is
|
||||
rotated once and the page asked again.
|
||||
|
||||
Reference in New Issue
Block a user