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

node-aptoma-plugin-auth

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-aptoma-plugin-auth

Node version of no.aptoma.plugin-api's example auth module.

  • 1.2.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
5
increased by400%
Maintainers
1
Weekly downloads
 
Created
Source

node-aptoma-plugin-auth

This is a NodeJS adaptation of the Aptoma Plugin API's auth module, originally implemented in PHP.

It is exposed as an express compatible request handler. The intention is that you attach it to any endpoint you wish.

For more details, see the original module.

Example usage

var app = require('express')();
var auth = require('node-aptoma-plugin-auth');

app.get('/auth', auth(
  'example-app',
  'DrPublish'
));

app.listen(8080);

Documentation

The module node-aptoma-plugin-auth provides an initializer function. Let's call it auth, as in:

var auth = require('node-aptoma-plugin-auth');

auth takes 3 parameters:

  • appName
  • key
  • pluginUrl (optional)

And returns an express compatible GET request hander function(req, res) that you can plug in anywhere. See quick example above.

The pluginUrl parameter, if supplied, can be a string or a function (req) that outputs the URL after being fed a request object. If omitted, the resulting handler will "autodetect" and assume that whatever URL it is being called as is the plugin URL.

FAQs

Package last updated on 22 Jan 2015

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