jdgabriel / tsc-custom-decorators

My attempt to create a decorator that does request runtime authentication XD

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Learning Typescript decorators for Authenticate method

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

About

My attempt to create a decorator that does request runtime authentication XD


Languages

Language:TypeScript 100.0%