1
0
mirror of https://github.com/mgerb/mywebsite synced 2026-01-12 10:52:47 +00:00

updated bunch of file paths and changed the way posts are loaded

This commit is contained in:
2016-01-05 12:28:04 -06:00
parent 4bb8cae81e
commit 6ab45fe935
13249 changed files with 317868 additions and 2101398 deletions

1
node_modules/basic-auth-connect/.npmignore generated vendored Normal file
View File

@@ -0,0 +1 @@
test.js

3
node_modules/basic-auth-connect/.travis.yml generated vendored Normal file
View File

@@ -0,0 +1,3 @@
node_js:
- "0.10"
language: node_js

8
node_modules/basic-auth-connect/Makefile generated vendored Normal file
View File

@@ -0,0 +1,8 @@
BIN = ./node_modules/.bin/
test:
@NODE_ENV=test $(BIN)mocha \
--require should \
--reporter spec
.PHONY: test

60
node_modules/basic-auth-connect/README.md generated vendored Normal file
View File

@@ -0,0 +1,60 @@
# simgr - Simple Image Resizer [![Build Status](https://travis-ci.org/expressjs/basic-auth-connect.png)](https://travis-ci.org/expressjs/basic-auth-connect)
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).
## API
```js
var basicAuth = require('basic-auth-connect');
```
Sorry, couldn't think of a more clever name.
Simple username and password
```js
connect()
.use(basicAuth('username', 'password'));
```
Callback verification
```js
connect()
.use(basicAuth(function(user, pass){
return 'tj' == user && 'wahoo' == pass;
}))
```
Async callback verification, accepting `fn(err, user)`.
```
connect()
.use(basicAuth(function(user, pass, fn){
User.authenticate({ user: user, pass: pass }, fn);
}))
```
## License
The MIT License (MIT)
Copyright (c) 2013 Jonathan Ong me@jongleberry.com
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

128
node_modules/basic-auth-connect/index.js generated vendored Normal file
View File

@@ -0,0 +1,128 @@
var http = require('http');
/*!
* Connect - basicAuth
* Copyright(c) 2010 Sencha Inc.
* Copyright(c) 2011 TJ Holowaychuk
* MIT Licensed
*/
/**
* Basic Auth:
*
* Status: Deprecated. No bug reports or pull requests are welcomed
* for this middleware. However, this middleware will not be removed.
* Instead, you should use [basic-auth](https://github.com/visionmedia/node-basic-auth).
*
* Enfore basic authentication by providing a `callback(user, pass)`,
* which must return `true` in order to gain access. Alternatively an async
* method is provided as well, invoking `callback(user, pass, callback)`. Populates
* `req.user`. The final alternative is simply passing username / password
* strings.
*
* Simple username and password
*
* connect(connect.basicAuth('username', 'password'));
*
* Callback verification
*
* connect()
* .use(connect.basicAuth(function(user, pass){
* return 'tj' == user && 'wahoo' == pass;
* }))
*
* Async callback verification, accepting `fn(err, user)`.
*
* connect()
* .use(connect.basicAuth(function(user, pass, fn){
* User.authenticate({ user: user, pass: pass }, fn);
* }))
*
* @param {Function|String} callback or username
* @param {String} realm
* @api public
*/
module.exports = function basicAuth(callback, realm) {
var username, password;
// user / pass strings
if ('string' == typeof callback) {
username = callback;
password = realm;
if ('string' != typeof password) throw new Error('password argument required');
realm = arguments[2];
callback = function(user, pass){
return user == username && pass == password;
}
}
realm = realm || 'Authorization Required';
return function(req, res, next) {
var authorization = req.headers.authorization;
if (req.user) return next();
if (!authorization) return unauthorized(res, realm);
var parts = authorization.split(' ');
if (parts.length !== 2) return next(error(400));
var scheme = parts[0]
, credentials = new Buffer(parts[1], 'base64').toString()
, index = credentials.indexOf(':');
if ('Basic' != scheme || index < 0) return next(error(400));
var user = credentials.slice(0, index)
, pass = credentials.slice(index + 1);
// async
if (callback.length >= 3) {
callback(user, pass, function(err, user){
if (err || !user) return unauthorized(res, realm);
req.user = req.remoteUser = user;
next();
});
// sync
} else {
if (callback(user, pass)) {
req.user = req.remoteUser = user;
next();
} else {
unauthorized(res, realm);
}
}
}
};
/**
* Respond with 401 "Unauthorized".
*
* @param {ServerResponse} res
* @param {String} realm
* @api private
*/
function unauthorized(res, realm) {
res.statusCode = 401;
res.setHeader('WWW-Authenticate', 'Basic realm="' + realm + '"');
res.end('Unauthorized');
};
/**
* Generate an `Error` from the given status `code`
* and optional `msg`.
*
* @param {Number} code
* @param {String} msg
* @return {Error}
* @api private
*/
function error(code, msg){
var err = new Error(msg || http.STATUS_CODES[code]);
err.status = code;
return err;
};

75
node_modules/basic-auth-connect/package.json generated vendored Normal file
View File

@@ -0,0 +1,75 @@
{
"_args": [
[
"basic-auth-connect@1.0.0",
"/home/mitchell/Desktop/test-mywebsite/mywebsite/node_modules/mongo-express"
]
],
"_from": "basic-auth-connect@1.0.0",
"_id": "basic-auth-connect@1.0.0",
"_inCache": true,
"_installable": true,
"_location": "/basic-auth-connect",
"_npmUser": {
"email": "jonathanrichardong@gmail.com",
"name": "jongleberry"
},
"_npmVersion": "1.3.21",
"_phantomChildren": {},
"_requested": {
"name": "basic-auth-connect",
"raw": "basic-auth-connect@1.0.0",
"rawSpec": "1.0.0",
"scope": null,
"spec": "1.0.0",
"type": "version"
},
"_requiredBy": [
"/mongo-express"
],
"_resolved": "https://registry.npmjs.org/basic-auth-connect/-/basic-auth-connect-1.0.0.tgz",
"_shasum": "fdb0b43962ca7b40456a7c2bb48fe173da2d2122",
"_shrinkwrap": null,
"_spec": "basic-auth-connect@1.0.0",
"_where": "/home/mitchell/Desktop/test-mywebsite/mywebsite/node_modules/mongo-express",
"author": {
"email": "me@jongleberry.com",
"name": "Jonathan Ong",
"url": "http://jongleberry.com"
},
"bugs": {
"url": "https://github.com/expressjs/basic-auth-connect/issues"
},
"dependencies": {},
"description": "Basic auth middleware for node and connect",
"devDependencies": {
"connect": "*",
"mocha": "*",
"should": "*",
"supertest": "*"
},
"directories": {},
"dist": {
"shasum": "fdb0b43962ca7b40456a7c2bb48fe173da2d2122",
"tarball": "http://registry.npmjs.org/basic-auth-connect/-/basic-auth-connect-1.0.0.tgz"
},
"homepage": "https://github.com/expressjs/basic-auth-connect",
"license": "MIT",
"maintainers": [
{
"name": "jongleberry",
"email": "jonathanrichardong@gmail.com"
}
],
"name": "basic-auth-connect",
"optionalDependencies": {},
"readme": "ERROR: No README data found!",
"repository": {
"type": "git",
"url": "git+https://github.com/expressjs/basic-auth-connect.git"
},
"scripts": {
"test": "make test"
},
"version": "1.0.0"
}