https://github.com/jdgabriel/tsc-custom-decorators
My attempt to create a decorator that does request runtime authentication XD
https://github.com/jdgabriel/tsc-custom-decorators
decorators nodejs ts-node-dev typescript
Last synced: 2 months ago
JSON representation
My attempt to create a decorator that does request runtime authentication XD
- Host: GitHub
- URL: https://github.com/jdgabriel/tsc-custom-decorators
- Owner: jdgabriel
- Created: 2022-09-05T12:48:56.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-09-05T12:49:46.000Z (almost 4 years ago)
- Last Synced: 2025-05-29T09:07:56.018Z (about 1 year ago)
- Topics: decorators, nodejs, ts-node-dev, typescript
- Language: TypeScript
- Homepage:
- Size: 18.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Learning Typescript decorators for Authenticate method
```javascript
// Route
//localhost:3535/dash/admin
http: {
header: {
role: "ADMIN";
}
}
// Route
//localhost:3535/dash/creator
http: {
header: {
role: "ADMIN" || "CREATOR";
}
}
// Route
//localhost:3535/dash/editor
http: {
header: {
role: "ADMIN" || "CREATOR" || "EDITOR";
}
}
```