TypeScript Rest JWT
JWT authentication for typescript-rest via decorators.
Precursor
To get started with typescript-rest-jwt, visit typescript-rest for a detailed getting started guide of the underlying library.
Usage
Install:
npm install -s typescript-rest-jwt
Update an existing controller:
// You must update the class level Path to also be an AuthPath, even// if you still have unsecured routes.
Before your call to typescript-rest's Server.buildServices, we need to configure our AuthHandler:
... AuthHandler.configureapp, jwtConfigServer.buildServicesapp, ...controllers
AuthHandler.configure either accepts string
secret or expressJWT.Options
.
License
MIT