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

flightworker-atk-auth

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

flightworker-atk-auth

## 中间件部署

  • 1.0.3
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-83.33%
Maintainers
1
Weekly downloads
 
Created
Source

flightworker-atk-auth

中间件部署

// API服务器
const auth = require('flightworker-atk-auth')
const middleware = config => (req, res, next) => {
    const $auth = auth({...})
    $auth.once('success', status => {
        next()
    })
    $auth.on('error', e => next())
    return auth.check(req, res)
}
// AMN or APN
const auth = require('flightworker-atk-auth')
const middleware = config => (req, res, next) => {
    const $auth = auth({...})
    $auth.once('token', token => {
        // todo 请将token发送至API配置的获取token的地址上
        next()
    })
    $auth.on('error', e => next())
    return auth.middleware(req, res)
}

Keywords

FAQs

Package last updated on 26 Mar 2018

Did you know?

Socket

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.

Install

Related posts

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