node-basic-auth 2.0.1-4 source package in Ubuntu
Changelog
node-basic-auth (2.0.1-4) unstable; urgency=medium * Team upload [ Debian Janitor ] * Apply multi-arch hints. + node-basic-auth: Add Multi-Arch: foreign. * Remove constraints unnecessary since buster (oldstable) [ Yadd ] * Update standards version to 4.6.1, no changes needed. * Replace /releases by /tags in GitHub urls -- Yadd <email address hidden> Mon, 31 Oct 2022 11:25:50 +0100
Upload details
- Uploaded by:
- Debian Javascript Maintainers
- Uploaded to:
- Sid
- Original maintainer:
- Debian Javascript Maintainers
- Architectures:
- all
- Section:
- misc
- Urgency:
- Medium Urgency
See full publishing history Publishing
Series | Published | Component | Section | |
---|---|---|---|---|
Oracular | release | universe | misc | |
Noble | release | universe | misc | |
Mantic | release | universe | misc | |
Lunar | release | universe | misc |
Downloads
File | Size | SHA-256 Checksum |
---|---|---|
node-basic-auth_2.0.1-4.dsc | 2.1 KiB | a0ecf7be5a244d4dbab1036d548975f1d2c0c446a4c4f1d2b22f79297204d93b |
node-basic-auth_2.0.1.orig.tar.gz | 5.2 KiB | 0e9e178b266ad6a31d607ed1b70f14d7fda5c04d147554cdf7bb2f462c242629 |
node-basic-auth_2.0.1-4.debian.tar.xz | 2.9 KiB | 8f82ea5ca48c6a3343eb135eedd2cf81da9ca81dafaceea0b7bb917bac2ae908 |
Available diffs
- diff from 2.0.1-3 to 2.0.1-4 (940 bytes)
No changes file available.
Binary packages built by this source
- node-basic-auth: Generic basic auth Authorization header field parser for whatever
nodejs basic auth parser module. This package is used as a dependency for node
web applications that require a simple authentication mechanism.
.
API
.
var auth = require('basic- auth')
.
auth(req)
.
Get the basic auth credentials from the given request. The Authorization header
is parsed and if the header is invalid, undefined is returned, otherwise an
object with name and pass properties.
.
auth.parse(string)
.
Parse a basic auth authorization header string. This will return an object with
name and pass properties, or undefined if the string is invalid.
.
Example
.
Pass a Node.js request object to the module export. If parsing fails undefined
is returned, otherwise an object with .name and .pass.
.
var auth = require('basic- auth')
var user = auth(req)
// => { name: 'something', pass: 'whatever' }
.
A header string from any other location can also be parsed with auth.parse,
for example a Proxy-Authorization header:
.
var auth = require('basic- auth')
var user = auth.parse(req.getHeader( 'Proxy- Authorization' ))