Re-sign a JWS (Compact or General JSON) with a new key

Verifies the incoming JWS (Compact or General JSON Serialization) under its embedded oldKid (or an explicit override) and, if valid, produces a replacement signature with newKid. Useful for algorithm migrations without touching payload bytes.

Serialization selection (PRD §60). The optional serialization field selects the representation of the RE-SIGNED output (the incoming form does not govern it) and is orthogonal to the backend-authoritative RFC 3161 time-stamping policy (§49). Two honest compliance tiers: RFC 7515 JWS (COMPACT = §7.1 three-segment compact, or JSON = §7.2 JWS JSON Serialization) and JAdES B-T (JWS JSON Serialization only, carrying an RFC 3161 qualified timestamp sigTst in the Unprotected Header per ETSI TS 119 182-1 — a COMPACT token structurally cannot carry it).

Behavior truth table (serialization × effective stamping → output form):

serializationstampingoutput400?
omittedOFFcompact JWSno
omittedREQUIREDJWS-JSON + sigTst (auto-upgrade, JAdES B-T)no
COMPACTOFFcompact JWSno
COMPACTREQUIRED400 serialization-incompatible-with-timestamp
JSONOFFJWS-JSON, no sigTstno
JSONREQUIREDJWS-JSON + sigTst (JAdES B-T)no

An explicit COMPACT is never silently upgraded and a mandated stamp is never dropped; the output column names the logical serialization tier. On the HTTP wire the re-signed JWS is ALWAYS carried in the typed jwsToken (RFC 7515 §7.2 JWS JSON Serialization) envelope: a COMPACT / unstamped result is a single-signature object with no sigTst (losslessly convertible to the 3-segment compact form), a JAdES B-T result carries the RFC 3161 sigTst in the unprotected header. The re-sign metadata envelope (old/new key requested, per-leg material versions, algorithms, warnings) is ALWAYS present regardless of serialization.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params

JSON object with:
jwsToken – typed JWS General JSON Serialization (RFC 7515 §7.2) to verify
newKid – kid to use for the new signature
sourceKidOverride – optional fallback kid if the protected header omits kid

Request to verify an existing JWS under oldKid
(embedded in the protected header) and sign the same payload
with newKid. An optional sourceKidOverride
may be provided if the original JWS protected header does not specify a kid.

Uses JWS General JSON Serialization (RFC 7515 §7.2) uniformly — single-signature
for SIMPLE keys, multi-signature for COMPOSITE hybrid keys.

jwsToken
object
required

Source JWS General JSON Serialization (RFC 7515 §7.2) signed with the old key.

string
required
length between 0 and 255
^[A-Za-z0-9._:-]+$

kid of the private key that must produce the new signature.

string
required
length between 0 and 255
^[A-Za-z0-9._:-]+$

Optional fallback key ID to use when the incoming
JWS header does not include a kid.

string | null
enum

Optional JWS serialization representation to produce for the re-signed token (PRD §60). COMPACT = RFC 7515 §7.1 compact (3 dot-separated segments); JSON = RFC 7515 §7.2 JWS JSON Serialization (able to carry a JAdES qualified timestamp). Omit to let the server choose the standards-correct representation: compact when no timestamp is mandated, JWS-JSON when the deployment/tenant policy requires an RFC 3161 signature timestamp (JAdES B-T). Governs the re-sign output only; it never adds or drops a timestamp. Requesting COMPACT while the backend-authoritative policy mandates a timestamp is the single incompatible combination and is rejected with HTTP 400.

Allowed:
Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

Language
Credentials
Bearer
JWT
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json
application/problem+json