def sign

bend-kit-jwt@0.11.0.1 · jwt.bend:597

import bend-kit-jwt@0.11.0.1/jwt.bend as Jwt
import Base
import bend-kit-json@0.7.0.0/json.bend as Json
import bend-kit-bytes@0.3.3.0/bytes.bend as Bytes

597# A compact token of claims signed with key for a; kid names the key in the header. Claims that are not
598# an object, or repeat a name, fail with BadClaim.
599def sign(+a: Alg, key: Key, kid: Maybe<&2, String>, claims: Json.Val) -> IO(Result<&1, &1, Err, String>):
600  sign.body(a, key, kid, Bytes.slice(Json.encode.bytes(claims), 0, 4294967295))

Uses (11)

Used by (0)

No other definition uses this definition.