New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

adonis-imperium

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

adonis-imperium - npm Package Compare versions

Comparing version 0.3.1 to 0.4.0

2

package.json
{
"name": "adonis-imperium",
"version": "0.3.1",
"version": "0.4.0",
"description": "This package is an **authorization provider** built on top of [imperium](https://github.com/mono-js/imperium).",

@@ -5,0 +5,0 @@ "repository": {

@@ -15,3 +15,3 @@ 'use strict'

if (await imperium.cannot(action, actionParams)) throw new AuthorizationException('Unauthorized', 401, 'E_UNAUTHORIZED')
if (await imperium.cannot(action, actionParams)) throw new AuthorizationException('Unauthorized', 403, 'E_UNAUTHORIZED')

@@ -22,3 +22,3 @@ await next()

async wsHandle ({ imperium }, next, [action]) {
if (await imperium.cannot(action)) throw new AuthorizationException('Unauthorized', 401, 'E_UNAUTHORIZED')
if (await imperium.cannot(action)) throw new AuthorizationException('Unauthorized', 403, 'E_UNAUTHORIZED')

@@ -25,0 +25,0 @@ await next()

@@ -7,3 +7,3 @@ 'use strict'

async handle ({ imperium }, next, [role]) {
if (await imperium.isnot(role)) throw new AuthorizationException('Unauthorized', 401, 'E_UNAUTHORIZED')
if (await imperium.isnot(role)) throw new AuthorizationException('Unauthorized', 403, 'E_UNAUTHORIZED')

@@ -14,3 +14,3 @@ await next()

async wsHandle ({ imperium }, next, [role]) {
if (await imperium.isnot(role)) throw new AuthorizationException('Unauthorized', 401, 'E_UNAUTHORIZED')
if (await imperium.isnot(role)) throw new AuthorizationException('Unauthorized', 403, 'E_UNAUTHORIZED')

@@ -17,0 +17,0 @@ await next()

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc