Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

denim-api-auth-middleware

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

denim-api-auth-middleware - npm Package Compare versions

Comparing version 1.0.6 to 1.0.7

21

package.json
{
"name": "denim-api-auth-middleware",
"version": "1.0.6",
"version": "1.0.7",
"description": "Express API Key Auth Middleware",

@@ -8,4 +8,3 @@ "main": "dist/index.js",

"precommit": "lint-staged",
"build":
"rm -rf dist && babel ./ --presets env --out-dir ./dist --source-maps --presets env --ignore node_modules,*.spec.js",
"build": "rm -rf dist && babel ./ --presets env --out-dir ./dist --source-maps --presets env --ignore node_modules,*.spec.js",
"test": "jest",

@@ -18,3 +17,8 @@ "format": "prettier-standard '**/*.js'"

},
"keywords": ["express", "api", "auth", "middleware"],
"keywords": [
"express",
"api",
"auth",
"middleware"
],
"author": "Michael W. Clark",

@@ -35,5 +39,10 @@ "license": "MIT",

"lint-staged": {
"*.js": ["prettier-standard **/*.js*", "git add"]
"*.js": [
"prettier-standard **/*.js*",
"git add"
]
},
"pre-commit": ["precommit"],
"pre-commit": [
"precommit"
],
"dependencies": {

@@ -40,0 +49,0 @@ "chai": "^4.1.2"

@@ -28,2 +28,3 @@ # denim-api-auth-middleware

import makeApiKeyAuthMiddlware from 'denim-api-auth-middleware'
import http from 'http'

@@ -38,5 +39,24 @@ const app = new Express()

app.use(apiKeyAuthMiddlware) // API Key auth middleware
app.get('/',(req, res)=>{
res.send('Great Success')
})
const server = http.createServer(app)
server.listen(8080, () =>
console.log('HTTP Server Listening on Port',8080)
)
```
```
# curl localhost:8080
Forbidden
# curl localhost:8080 \
--header "Authorization: mySecretKey:mySecretPassword"
Great Success
```
## Running the tests

@@ -43,0 +63,0 @@ run tests once:

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