INNER CODE UNIT · TypeScript
signSync
cloudflare/web-bot-auth · packages/web-bot-auth/src/index.ts:312
export function signSync(
request: Request | RequestDescriptor,
options: SignSyncOptions
): SignatureFields {
return createSignatureSync(request, {
...signingOptions(request, options),
signer: options.signer,
});
}
function profileCandidate(
request: Request | RequestDescriptor,
candidate: UntrustedSignatureCandidate
): UntrustedWebBotSignatureCandidate {
const { algorithm, parameters, components } = candidate;
if (algorithm !== "ed25519" && algorithm !== "rsa-pss-sha512") {
return policyError("signed algorithm is missing or unsupported");
}