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

@ovos-media/sign-helpers

Package Overview
Dependencies
Maintainers
9
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ovos-media/sign-helpers - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

1

lib/verifyRequest.js

@@ -52,3 +52,2 @@ const Hawk = require('hawk');

.then(function (result) {
console.log(result);
return result.credentials.id;

@@ -55,0 +54,0 @@ })

2

package.json
{
"name": "@ovos-media/sign-helpers",
"version": "1.0.0",
"version": "1.0.1",
"description": "Helpers for sign service.",

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

@@ -8,15 +8,20 @@ # @ovos-media/sign-helpers

```js
const createVerifyRequest = require('@ovos-media/sign-helpers').verifyRequest;
const verifyRequest = createVerifyRequest({
basePath: process.env.SERVICE_PATH, // or basePath(ctx) { return ctx.something; }
const makeVerifyRequest = require('@ovos-media/sign-helpers').verifyRequest;
const verifyRequest = makeVerifyRequest({
basePath: process.env.SERVICE_PATH,
path(ctx) { return ctx.request.url; }
});
const someProcessingThing = (ctx) => {
const work = (ctx) => {
const credentials = verifyRequest(ctx);
console.log(credentials);
if (credentials) {
ctx.status = 200;
} else {
ctx.status = 401;
}
}
router.get('/url', someProcessingThing);
router.get('/url', work);
```

@@ -23,0 +28,0 @@

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