moleculer-web
moleculer-web copied to clipboard
Authorization adapters
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:
good idea 👍