
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
casbinjs-server-tool
Advanced tools
This package provides the facilities to generate permission tokens on node-casbin service.
If you are using Casbin.js at your frontend and Node-Casbin as your backend Casbin service, you can install this package at your backend. This package provides a wrapper for generating the user profile passed to Casbin.js at the frontend.
npm install --save casbinjs-server-tool
# or
yarn add casbinjs-server-tool
import CasbinServerTool from 'casbinjs-server-tool'
// In your Restful API
private async setRouter(): Promise<void> {
this.app.get('/api/casbin', async (req: express.Request, res: express.Response) => {
// Get the user identity from URL.
const user = String(req.query["casbin_user"]);
// Initialize the casbin server tool with casbin enforcer
const casbinSvrTool = new CasbinServerTool(enforcer);
// Generate the user's profile
const profile = casbinSvrTool.genJsonProfile(user);
// Return the response to the client-side.
res.status(200).json({
message: 'ok',
data: profile
})
})
}
FAQs
This package provides the facilities to generate permission tokens on node-casbin service.
The npm package casbinjs-server-tool receives a total of 3 weekly downloads. As such, casbinjs-server-tool popularity was classified as not popular.
We found that casbinjs-server-tool demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.