fastify-txstate 3.3.1 → 3.3.2

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.
package/lib/index.d.ts CHANGED
@@ -82,6 +82,7 @@ export interface FastifyTxStateOptions extends Partial<FastifyServerOptions> {
82
82
  declare module 'fastify' {
83
83
  interface FastifyRequest {
84
84
  auth?: FastifyTxStateAuthInfo;
85
+ token?: string;
85
86
  }
86
87
  interface FastifyReply {
87
88
  extraLogInfo: any;
@@ -102,6 +102,7 @@ async function unifiedAuthenticate(req) {
102
102
  if (!payload)
103
103
  return undefined;
104
104
  await validateCache.get(token, payload);
105
+ req.token = token;
105
106
  return {
106
107
  username: payload.sub,
107
108
  sessionId: payload.sub + '-' + payload.iat,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fastify-txstate",
3
- "version": "3.3.1",
3
+ "version": "3.3.2",
4
4
  "description": "A small wrapper for fastify providing a set of common conventions & utility functions we use.",
5
5
  "exports": {
6
6
  ".": {