jws encryption support (#74)

This commit is contained in:
Simon J
2021-11-06 09:03:46 +11:00
committed by GitHub
parent eea102891d
commit 9851ee46b3
9 changed files with 121 additions and 50 deletions

View File

@@ -34,7 +34,7 @@ import { Icon, ICONS, festivals, features } from "./icon";
import _, { shuffle } from "underscore";
import morgan from "morgan";
import { takeWithRepeats } from "./utils";
import { jwtTokenSigner, Signer } from "./encryption";
import { jwtSigner, Signer } from "./encryption";
export const BONOB_ACCESS_TOKEN_HEADER = "bat";
@@ -97,7 +97,7 @@ const DEFAULT_SERVER_OPTS: ServerOpts = {
applyContextPath: true,
logRequests: false,
version: "v?",
tokenSigner: jwtTokenSigner(`bonob-${uuid()}`),
tokenSigner: jwtSigner(`bonob-${uuid()}`),
};
function server(