GoogleOauth2.0 First implementation
First try for GoogleOauth2.0
This commit is contained in:
20
express-server/node_modules/passport-strategy/.jshintrc
generated
vendored
Normal file
20
express-server/node_modules/passport-strategy/.jshintrc
generated
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
"node": true,
|
||||
|
||||
"bitwise": true,
|
||||
"camelcase": true,
|
||||
"curly": true,
|
||||
"forin": true,
|
||||
"immed": true,
|
||||
"latedef": true,
|
||||
"newcap": true,
|
||||
"noarg": true,
|
||||
"noempty": true,
|
||||
"nonew": true,
|
||||
"quotmark": "single",
|
||||
"undef": true,
|
||||
"unused": true,
|
||||
"trailing": true,
|
||||
|
||||
"laxcomma": true
|
||||
}
|
15
express-server/node_modules/passport-strategy/.travis.yml
generated
vendored
Normal file
15
express-server/node_modules/passport-strategy/.travis.yml
generated
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
language: "node_js"
|
||||
node_js:
|
||||
- "0.4"
|
||||
- "0.6"
|
||||
- "0.8"
|
||||
- "0.10"
|
||||
|
||||
before_install:
|
||||
- "npm install istanbul -g"
|
||||
- "npm install coveralls -g"
|
||||
|
||||
script: "make ci-travis"
|
||||
|
||||
after_success:
|
||||
- "make submit-coverage-to-coveralls"
|
20
express-server/node_modules/passport-strategy/LICENSE
generated
vendored
Normal file
20
express-server/node_modules/passport-strategy/LICENSE
generated
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
(The MIT License)
|
||||
|
||||
Copyright (c) 2011-2013 Jared Hanson
|
||||
|
||||
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.
|
61
express-server/node_modules/passport-strategy/README.md
generated
vendored
Normal file
61
express-server/node_modules/passport-strategy/README.md
generated
vendored
Normal file
@ -0,0 +1,61 @@
|
||||
# passport-strategy
|
||||
|
||||
[](http://travis-ci.org/jaredhanson/passport-strategy)
|
||||
[](https://coveralls.io/r/jaredhanson/passport-strategy)
|
||||
[](http://david-dm.org/jaredhanson/passport-strategy)
|
||||
|
||||
|
||||
An abstract class implementing [Passport](http://passportjs.org/)'s strategy
|
||||
API.
|
||||
|
||||
## Install
|
||||
|
||||
$ npm install passport-strategy
|
||||
|
||||
## Usage
|
||||
|
||||
This module exports an abstract `Strategy` class that is intended to be
|
||||
subclassed when implementing concrete authentication strategies. Once
|
||||
implemented, such strategies can be used by applications that utilize Passport
|
||||
middleware for authentication.
|
||||
|
||||
#### Subclass Strategy
|
||||
|
||||
Create a new `CustomStrategy` constructor which inherits from `Strategy`:
|
||||
|
||||
```javascript
|
||||
var util = require('util')
|
||||
, Strategy = require('passport-strategy');
|
||||
|
||||
function CustomStrategy(...) {
|
||||
Strategy.call(this);
|
||||
}
|
||||
|
||||
util.inherits(CustomStrategy, Strategy);
|
||||
```
|
||||
|
||||
#### Implement Authentication
|
||||
|
||||
Implement `autheticate()`, performing the necessary operations required by the
|
||||
authentication scheme or protocol being implemented.
|
||||
|
||||
```javascript
|
||||
CustomStrategy.prototype.authenticate = function(req, options) {
|
||||
// TODO: authenticate request
|
||||
}
|
||||
```
|
||||
|
||||
## Tests
|
||||
|
||||
$ npm install
|
||||
$ npm test
|
||||
|
||||
## Credits
|
||||
|
||||
- [Jared Hanson](http://github.com/jaredhanson)
|
||||
|
||||
## License
|
||||
|
||||
[The MIT License](http://opensource.org/licenses/MIT)
|
||||
|
||||
Copyright (c) 2011-2013 Jared Hanson <[http://jaredhanson.net/](http://jaredhanson.net/)>
|
15
express-server/node_modules/passport-strategy/lib/index.js
generated
vendored
Normal file
15
express-server/node_modules/passport-strategy/lib/index.js
generated
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
/**
|
||||
* Module dependencies.
|
||||
*/
|
||||
var Strategy = require('./strategy');
|
||||
|
||||
|
||||
/**
|
||||
* Expose `Strategy` directly from package.
|
||||
*/
|
||||
exports = module.exports = Strategy;
|
||||
|
||||
/**
|
||||
* Export constructors.
|
||||
*/
|
||||
exports.Strategy = Strategy;
|
28
express-server/node_modules/passport-strategy/lib/strategy.js
generated
vendored
Normal file
28
express-server/node_modules/passport-strategy/lib/strategy.js
generated
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
/**
|
||||
* Creates an instance of `Strategy`.
|
||||
*
|
||||
* @constructor
|
||||
* @api public
|
||||
*/
|
||||
function Strategy() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Authenticate request.
|
||||
*
|
||||
* This function must be overridden by subclasses. In abstract form, it always
|
||||
* throws an exception.
|
||||
*
|
||||
* @param {Object} req The request to authenticate.
|
||||
* @param {Object} [options] Strategy-specific options.
|
||||
* @api public
|
||||
*/
|
||||
Strategy.prototype.authenticate = function(req, options) {
|
||||
throw new Error('Strategy#authenticate must be overridden by subclass');
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Expose `Strategy`.
|
||||
*/
|
||||
module.exports = Strategy;
|
77
express-server/node_modules/passport-strategy/package.json
generated
vendored
Normal file
77
express-server/node_modules/passport-strategy/package.json
generated
vendored
Normal file
@ -0,0 +1,77 @@
|
||||
{
|
||||
"_from": "passport-strategy@1.x.x",
|
||||
"_id": "passport-strategy@1.0.0",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-tVOaqPwiWj0a0XlHbd8ja0QPUuQ=",
|
||||
"_location": "/passport-strategy",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "passport-strategy@1.x.x",
|
||||
"name": "passport-strategy",
|
||||
"escapedName": "passport-strategy",
|
||||
"rawSpec": "1.x.x",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "1.x.x"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/passport",
|
||||
"/passport-oauth1",
|
||||
"/passport-oauth2"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/passport-strategy/-/passport-strategy-1.0.0.tgz",
|
||||
"_shasum": "b5539aa8fc225a3d1ad179476ddf236b440f52e4",
|
||||
"_spec": "passport-strategy@1.x.x",
|
||||
"_where": "C:\\Users\\Georg\\GitHub\\SmartShopper\\express-server\\node_modules\\passport",
|
||||
"author": {
|
||||
"name": "Jared Hanson",
|
||||
"email": "jaredhanson@gmail.com",
|
||||
"url": "http://www.jaredhanson.net/"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "http://github.com/jaredhanson/passport-strategy/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {},
|
||||
"deprecated": false,
|
||||
"description": "An abstract class implementing Passport's strategy API.",
|
||||
"devDependencies": {
|
||||
"chai": "1.x.x",
|
||||
"mocha": "1.x.x"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4.0"
|
||||
},
|
||||
"homepage": "https://github.com/jaredhanson/passport-strategy#readme",
|
||||
"keywords": [
|
||||
"passport",
|
||||
"strategy"
|
||||
],
|
||||
"licenses": [
|
||||
{
|
||||
"type": "MIT",
|
||||
"url": "http://www.opensource.org/licenses/MIT"
|
||||
}
|
||||
],
|
||||
"main": "./lib",
|
||||
"name": "passport-strategy",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/jaredhanson/passport-strategy.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha --reporter spec --require test/bootstrap/node test/*.test.js"
|
||||
},
|
||||
"testling": {
|
||||
"browsers": [
|
||||
"chrome/latest"
|
||||
],
|
||||
"harness": "mocha",
|
||||
"files": [
|
||||
"test/bootstrap/testling.js",
|
||||
"test/*.test.js"
|
||||
]
|
||||
},
|
||||
"version": "1.0.0"
|
||||
}
|
Reference in New Issue
Block a user