Signs a relay command: an umis-relay-cmd+jwt that authorises exactly one HTTP body for one relay. It carries the
relay it is meant for (aud), its lifetime (ttlSeconds, 10 by default and 30 at most), a random single-use jti of
16 bytes and bh, the SHA-256 of the UTF-8 body as base64url, so that the body cannot be swapped after signing.
iss names the station or device that sends the command. The result goes into the X-Umis-Command header of the
request whose body is body. The function runs in browsers: signing and hashing go through the crypto provider.
Signs a relay command: an
umis-relay-cmd+jwtthat authorises exactly one HTTP body for one relay. It carries the relay it is meant for (aud), its lifetime (ttlSeconds, 10 by default and 30 at most), a random single-usejtiof 16 bytes andbh, the SHA-256 of the UTF-8 body as base64url, so that the body cannot be swapped after signing.issnames the station or device that sends the command. The result goes into theX-Umis-Commandheader of the request whose body isbody. The function runs in browsers: signing and hashing go through the crypto provider.