Bug:Fix file validation issue
[vnfsdk/refrepo.git] / vnfmarket / src / main / webapp / vnfmarket / node_modules / basic-auth-connect / README.md
1 # simgr - Simple Image Resizer [![Build Status](https://travis-ci.org/expressjs/basic-auth-connect.png)](https://travis-ci.org/expressjs/basic-auth-connect)
2
3 Connect's Basic Auth middleware in its own module. This module is considered deprecated. You should instead create your own middleware with [basic-auth](https://github.com/visionmedia/node-basic-auth).
4
5 ## API
6
7 ```js
8 var basicAuth = require('basic-auth-connect');
9 ```
10
11 Sorry, couldn't think of a more clever name.
12
13 Simple username and password
14
15 ```js
16 connect()
17 .use(basicAuth('username', 'password'));
18 ```
19
20 Callback verification
21
22 ```js
23 connect()
24 .use(basicAuth(function(user, pass){
25   return 'tj' == user && 'wahoo' == pass;
26 }))
27 ```
28
29 Async callback verification, accepting `fn(err, user)`.
30
31 ```
32 connect()
33 .use(basicAuth(function(user, pass, fn){
34   User.authenticate({ user: user, pass: pass }, fn);
35 }))
36 ```
37
38 ## License
39
40 The MIT License (MIT)
41
42 Copyright (c) 2013 Jonathan Ong me@jongleberry.com
43
44 Permission is hereby granted, free of charge, to any person obtaining a copy
45 of this software and associated documentation files (the "Software"), to deal
46 in the Software without restriction, including without limitation the rights
47 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
48 copies of the Software, and to permit persons to whom the Software is
49 furnished to do so, subject to the following conditions:
50
51 The above copyright notice and this permission notice shall be included in
52 all copies or substantial portions of the Software.
53
54 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
55 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
56 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
57 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
58 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
59 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
60 THE SOFTWARE.