@denodeio/seshat 0.0.27 → 0.0.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -26,7 +26,7 @@ type JwtPayload<T> = {
26
26
  };
27
27
  export * from "./signer";
28
28
  type OptionsInput = {
29
- sessionName?: string;
29
+ fieldName?: string;
30
30
  barongJwtPublicKey?: string;
31
31
  issuer?: string;
32
32
  };
@@ -40,7 +40,7 @@ type JwtPayload<T> = {
40
40
  };
41
41
 
42
42
  type OptionsInput = {
43
- sessionName?: string;
43
+ fieldName?: string;
44
44
  barongJwtPublicKey?: string;
45
45
  issuer?: string;
46
46
  };
@@ -6508,7 +6508,7 @@ function signData(payload, options) {
6508
6508
  }
6509
6509
 
6510
6510
  const sessionVerifier = function (options) {
6511
- const { sessionName = "session", ...actualOptions } = options;
6511
+ const { fieldName = "session", ...actualOptions } = options;
6512
6512
  if (!options || !options.barongJwtPublicKey) {
6513
6513
  throw new Error("Barong JWT Public key should be set");
6514
6514
  }
@@ -6529,7 +6529,7 @@ const sessionVerifier = function (options) {
6529
6529
  return;
6530
6530
  }
6531
6531
  try {
6532
- req[sessionName] = jwt.verify(authHeader, barongJwtPublicKey, verificationOptions);
6532
+ req[fieldName] = jwt.verify(authHeader, barongJwtPublicKey, verificationOptions);
6533
6533
  }
6534
6534
  catch (error) {
6535
6535
  res.status(403);