Repository navigation
Support query-parameter auth (refs #5) - #6
Merged
Merged
Conversation
Mirrors sprites-api's query credential: auth may be {"query": name}. The
probe runner strips every parameter of that name from the probe path,
appends its own URL-encoded, sends no credential header and redacts the
key, raw and encoded, from everything it prints or records. The schema
copy also catches up with examples being required and the tier, owner and
source_url fields. Refs #5.
An API that echoes the request URL may lowercase or mix the case of percent escapes, so %2b survived a match on %2B and a usable key could reach a fixture. One case-insensitive matcher now covers the key as typed, form-encoded and URI-encoded, in holdsKey and redactText alike.
aezell
pushed a commit
that referenced
this pull request
Oct 19, 2026
* Add Pushover community connector Sends notifications through Pushover with the application token injected as the token query parameter (#5, #6). Forwards POST /1/messages.json, POST /1/users/validate.json, GET /1/apps/limits.json (the probe) and GET /1/receipts/:receipt.json. The recipient's user key stays with the Sprite. Probe recordings for a good and a wrong token are under fixtures/pushover/. * Keep Pushover's colours in the mark Pushover's logo terms do not allow changing its colours, so mark.svg is now the full-colour logo, identical to icon.svg, rather than a currentColor rendering.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #5.
Mirrors query-parameter auth from superfly/sprites-api#1574 into the manifest format, the probe runner and the contributor guide. A connector may now declare
Depends on sprites-api PR superfly/sprites-api#1574 being released. The format and tooling accept the form today, but a query-auth connector (Pushover) cannot ship from this repository until the gateway that understands it is live.
What changed
v1/schema.json: copied frompriv/connectors/schema.jsonon the sprites-api branch. Theauthdefinition gains the{"query": name}object (name matching^[^\s=&%]+$) and descriptions. The copy here had also fallen behind sprites-apimain, so the same diff brings inexamplesbeing required with at least one entry, theprobe.expect-or-hooksrule, and thetier,ownerandsource_urlfields. Every example, the Notion connector and the template validate against it.scripts/lib/credential.mjs(new): the key placement shared by the runner and the checks. For the query form it strips every parameter of that name from the query string (keys decoded for the comparison, so%74okencounts; other pairs keep the caller's encoding) and appendsname=<key>x-www-form-urlencoded. AlsoredactText/holdsKey, which cover the key as typed and URL-encoded.scripts/probe.mjs: honoursauth.query; sends no credential header for it; redirects stay off and there are still no retries. The request line it prints, every error and the written fixture pass through redaction, so neither the raw nor the encoded key appears, including when the API echoes the request URL in a body or header. The command body moved into an exportedrun(argv, {root, env, log, error})so it can be tested end to end on a sandbox root; the CLI behaviour and exit codes are unchanged.scripts/lib/manifest.mjs:manifestProblemsreports anauththat is not one of the three forms in words, socheck-connectors.mjssays what is wrong without ajv.scripts/test/credential.test.mjs(the gateway's own query-string, encoding and redaction cases), query-auth cases inprobe.test.mjsagainst the localhttp.createServerstub (the server sees exactly onetokenparameter with the key although the probe path carriedtoken=wrong, no Authorization header, and neither the printed output nor the written fixture holds the key raw or encoded, also on a transport error), and an auth case inmanifest.test.mjs. 47 tests pass on Node 22.CONTRIBUTING.md: documents{"query": "token"}, that Sprites replaces any parameter of that name the Sprite sends rather than appending, that the key then appears in the request URL so the connector's notices should say so, and that connectors whose API echoes request URLs in error bodies setgateway_error_messagestofalse. The "cannot do" list now reads bearer token, fixed header or query parameter.v1/vectors.jsonhas no auth cases; the template does not explain auth, so it was left alone.Checks run
node --test "scripts/test/*.test.mjs": 47 passnode scripts/check-connectors.mjs: 12 connector(s) okexamples/*,connectors/*and the template: all valid