File: control

package info (click to toggle)
node-basic-auth 2.0.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 108 kB
  • sloc: javascript: 197; makefile: 2
file content (58 lines) | stat: -rw-r--r-- 1,828 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
Source: node-basic-auth
Section: javascript
Priority: optional
Maintainer: Debian Javascript Maintainers <pkg-javascript-devel@lists.alioth.debian.org>
Uploaders:
 Harley Swick <fancycade@protonmail.com>,
Testsuite: autopkgtest-pkg-nodejs
Build-Depends:
 debhelper-compat (= 13),
 mocha,
 node-safe-buffer <!nocheck>,
 nodejs (>= 6),
 pkg-js-tools,
Standards-Version: 4.5.0
Homepage: https://github.com/jshttp/basic-auth#readme
Vcs-Git: https://salsa.debian.org/js-team/node-basic-auth.git
Vcs-Browser: https://salsa.debian.org/js-team/node-basic-auth
Rules-Requires-Root: no

Package: node-basic-auth
Architecture: all
Depends:
 node-safe-buffer (>= 5.1.2),
 nodejs (>= 6),
 ${misc:Depends},
Description: 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'))