Skip to content

Commit

Permalink
Fix missing Typescript properties for namespaces (#182)
Browse files Browse the repository at this point in the history
  • Loading branch information
scantarbian committed Oct 14, 2021
1 parent f943e0d commit d3925dd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions jwt.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ export interface FastifyJWTOptions {
trusted?: (request: fastify.FastifyRequest, decodedToken: { [k: string]: any }) => boolean | Promise<boolean> | SignPayloadType | Promise<SignPayloadType>
formatUser?: (payload: SignPayloadType) => UserType,
jwtDecode?: boolean | string
namespace?: string
jwtVerify?: string
jwtSign?: string
}

export interface JWT {
Expand Down
5 changes: 4 additions & 1 deletion jwt.test-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ const jwtOptions: FastifyJWTOptions = {
: payload;
return { name: objectPayload.userName }
},
jwtDecode: true
jwtDecode: true,
namespace: 'security',
jwtVerify: 'securityVerify',
jwtSign: 'securitySign'
}

app.register(fastifyJwt, jwtOptions);
Expand Down

0 comments on commit d3925dd

Please sign in to comment.