An open API service indexing awesome lists of open source software.

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

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";
}
}
```