moleculer-web icon indicating copy to clipboard operation
moleculer-web copied to clipboard

Authorization adapters

Open intech opened this issue 3 years ago • 1 comments

Add sugar to the moleculer-web, the authorize option in the settings, example:

authorize: {
  type: "bearer", // add social and other adapters
  checkToken: "user.resolveToken"
}
authorize: {
  type: "query", // from url query params or header
  param: "token",
  checkToken: "user.resolveToken"
}

and through the function who needs a custom solution, example:

authorize: (ctx, route, req) => {},

Thus, it will be possible to make a semblance of an authorization adapter and use the modules.

Write your wishes in this issue! :speech_balloon:

intech avatar Apr 19 '21 06:04 intech

good idea 👍

icebob avatar Apr 19 '21 15:04 icebob