
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@voilab/vmol-auth
Advanced tools
Expect a JWT in ctx.meta.token
. Will parse and check the JWT and then put the resulting token in ctx.locals.token
.
If the token is invalid, expired or malformed, a MoleculerClientError
exception will be thrown.
If no token is provided, no exception is thrown and ctx.locals.token
is undefined.
Expects an array role
inside ctx.locals.token
. Will request Casl abilites definition from the abilities service and match the requested action against the abilities.
If the user doesn't have access to that action, a MoleculerClientError
exception will be thrown.
To enable, add the middleware to your services.
module.exports = {
name: 'myservice',
/**
* Mixins
*/
mixins: [ AuthorizationMixin, AuthenticationMixin ],
};
When usign both AuthorizationMixin
and AuthenticationMixin
, authentication must be set after authorization.
FAQs
Authentication and Authorization framework for Moleculer
The npm package @voilab/vmol-auth receives a total of 90 weekly downloads. As such, @voilab/vmol-auth popularity was classified as not popular.
We found that @voilab/vmol-auth demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.