Socket
Socket
Sign inDemoInstall

couch-proxy-auth

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    couch-proxy-auth

Creates CouchDB Proxy Authentication Headers


Version published
Weekly downloads
8
increased by100%
Maintainers
1
Install size
4.15 kB
Created
Weekly downloads
 

Readme

Source

CouchDB Proxy Authentication Headers

build status

Creates CouchDB Proxy Authentication Headers

Installation

npm install couch-proxy-auth

Usage

var xauth = require('couch-proxy-auth')

var headers = xauth('username', 'role', 'secret')

/*
  {
    'X-Auth-CouchDB-UserName': 'username'
    'X-Auth-CouchDB-Token': '0xde7c9b8bbaab8a73f090cd4d9',
    'X-Auth-CouchDB-Roles': 'role'
  }
*/

The token is generated by HMAC-SHA1(secret, username) and represented as Hex.

Parameters

xauth(username, roles, secret)

  • username Name of the user in CouchDB
  • roles Array of (multiple) roles or string for a singe role
  • secret Optional, but recommended, shared secret (see documentation)

CouchDB Proxy Authentication

For more information see the CouchDB Docs

License

MIT

Keywords

FAQs

Last updated on 29 Aug 2014

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc