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

@biscuit-auth/biscuit-wasm

Package Overview
Dependencies
Maintainers
2
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@biscuit-auth/biscuit-wasm - npm Package Compare versions

Comparing version 0.4.0-alpha2 to 0.4.0-alpha3

module/LICENSE

8

module/biscuit.d.ts

@@ -91,2 +91,10 @@ /* tslint:disable */

/**
* Creates a BlockBuilder
*
* the builder can be merged with a `BiscuitBuilder`, another `BlockBuilder`,
* and used to append a block to a biscuit
* @returns {BlockBuilder}
*/
static block_builder(): BlockBuilder;
/**
* Creates an attenuated token by adding the block generated by the BlockBuilder

@@ -93,0 +101,0 @@ * @param {BlockBuilder} block

@@ -55,2 +55,38 @@ import * as wasm from "./biscuit_bg.wasm";

export function block(strings, ...values) {
let code = "";
for (let i = 0; i < strings.length; i++) {
code += strings[i];
if(i < values.length){
code += `{_param_${i}}`
}
}
const termParameters = Object.fromEntries(values.map((v, i) => {
return [
`_param_${i}`,
prepareTerm(v)
];
}));
const isKeyParam = (v) => {
return typeof v === "string" && v.startsWith("ed25519/") || v.toDatalogParameter;
};
const keyParameters = Object.fromEntries(
values.map((v,i) => [i,v])
.filter(([i,v]) => isKeyParam(v))
.map(([i,v]) => {
return [
`_param_${i}`,
prepareTerm(v)
];
})
);
const builder = Biscuit.block_builder();
builder.addCodeWithParameters(code, termParameters, keyParameters);
return builder;
}
export function authorizer(strings, ...values) {

@@ -57,0 +93,0 @@ let code = "";

2

package.json
{
"name": "@biscuit-auth/biscuit-wasm",
"description": "WebAssembly wrapper for Biscuit authorization tokens",
"version": "0.4.0-alpha2",
"version": "0.4.0-alpha3",
"license": "Apache-2.0",

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

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

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