Debug
62 |{{debug}}
63 | ├── .gitattributes ├── .gitignore ├── LICENSE.TXT ├── README.md ├── app.js ├── bin └── www ├── helpers └── auth.js ├── package-lock.json ├── package.json ├── public └── stylesheets │ └── style.css ├── readme-images ├── new-password.PNG └── node-tutorial.PNG ├── routes ├── authorize.js ├── calendar.js ├── contacts.js ├── index.js └── mail.js ├── sample.env └── views ├── calendar.hbs ├── contacts.hbs ├── error.hbs ├── index.hbs ├── layout.hbs └── mail.hbs /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | 7 | # Standard to msysgit 8 | *.doc diff=astextplain 9 | *.DOC diff=astextplain 10 | *.docx diff=astextplain 11 | *.DOCX diff=astextplain 12 | *.dot diff=astextplain 13 | *.DOT diff=astextplain 14 | *.pdf diff=astextplain 15 | *.PDF diff=astextplain 16 | *.rtf diff=astextplain 17 | *.RTF diff=astextplain 18 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Windows image file caches 2 | Thumbs.db 3 | ehthumbs.db 4 | 5 | # Folder config file 6 | Desktop.ini 7 | 8 | # Recycle Bin used on file shares 9 | $RECYCLE.BIN/ 10 | 11 | # Windows Installer files 12 | *.cab 13 | *.msi 14 | *.msm 15 | *.msp 16 | 17 | # Windows shortcuts 18 | *.lnk 19 | 20 | # ========================= 21 | # Operating System Files 22 | # ========================= 23 | 24 | # OSX 25 | # ========================= 26 | 27 | .DS_Store 28 | .AppleDouble 29 | .LSOverride 30 | 31 | # Thumbnails 32 | ._* 33 | 34 | # Files that might appear on external disk 35 | .Spotlight-V100 36 | .Trashes 37 | 38 | # Directories potentially created on remote AFP share 39 | .AppleDB 40 | .AppleDesktop 41 | Network Trash Folder 42 | Temporary Items 43 | .apdisk 44 | node_modules 45 | readme.html 46 | npm-debug.log 47 | 48 | # VS Code 49 | .vscode 50 | .env 51 | -------------------------------------------------------------------------------- /LICENSE.TXT: -------------------------------------------------------------------------------- 1 | node-tutorial https://github.com/jasonjoh/node-tutorial 2 | 3 | Copyright (c) Microsoft Corporation 4 | All rights reserved. 5 | 6 | MIT License: 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining 9 | a copy of this software and associated documentation files (the 10 | ""Software""), to deal in the Software without restriction, including 11 | without limitation the rights to use, copy, modify, merge, publish, 12 | distribute, sublicense, and/or sell copies of the Software, and to 13 | permit persons to whom the Software is furnished to do so, subject to 14 | the following conditions: 15 | 16 | The above copyright notice and this permission notice shall be 17 | included in all copies or substantial portions of the Software. 18 | 19 | THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND, 20 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 22 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 23 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 24 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 25 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Getting Started with the Outlook Mail API and Node.js # 2 | 3 | This sample app is the result of following the tutorial at [https://docs.microsoft.com/en-us/outlook/rest/node-tutorial](https://docs.microsoft.com/en-us/outlook/rest/node-tutorial). If you follow that tutorial, you should come up with something fairly close to the code in this repository. 4 | 5 | > **NOTE:** Looking for the version of this tutorial that used the Outlook API directly instead of Microsoft Graph? Check out the `outlook-api` branch. Note that Microsoft recommends using the Microsoft Graph to access mail, calendar, and contacts. You should use the Outlook APIs directly (via https://outlook.office.com/api) only if you require a feature that is not available on the Graph endpoints. 6 | 7 | ## Prerequisites 8 | 9 | - Node.js installed and working on your development machine. 10 | - An Office 365 tenant, with access to an administrator account in that tenant, **OR** an Outlook.com account. 11 | 12 | ## Running the sample 13 | 14 | If you didn't follow the tutorial and just want to download this repo and try it out, you need to do a few things first. 15 | 16 | ## Register the app 17 | 18 | Before we proceed, we need to register our app to obtain a client ID and secret. Head over to https://apps.dev.microsoft.com to quickly get a client ID and secret. Using the sign in buttons, sign in with either your Microsoft account (Outlook.com), or your work or school account (Office 365). 19 | 20 | Once you're signed in, click the **Add an app** button. Enter `node-tutorial` for the name and click **Create application**. After the app is created, locate the **Application Secrets** section, and click the **Generate New Password** button. Copy the password now and save it to a safe place. Once you've copied the password, click **Ok**. 21 | 22 |  23 | 24 | Locate the **Platforms** section, and click **Add Platform**. Choose **Web**, then enter `http://localhost:3000/authorize` under **Redirect URIs**. Click **Save** to complete the registration. Copy the **Application Id** and save it along with the password you copied earlier. We'll need those values soon. 25 | 26 | Here's what the details of your app registration should look like when you are done. 27 | 28 |  29 | 30 | ## Configure the sample 31 | 32 | Rename the `sample.env` file to `.env`. Replace the `YOUR APP ID HERE` with the application ID and `YOUR APP PASSWORD HERE` with the password you generated and save your changes. 33 | 34 | Open your command prompt or shell and enter the following command to install dependencies. 35 | 36 | ```Shell 37 | npm install 38 | ``` 39 | 40 | ## Run the sample 41 | 42 | Open your command prompt or shell and enter the following command. 43 | 44 | ```Shell 45 | npm start 46 | ``` 47 | 48 | ## Copyright ## 49 | 50 | Copyright (c) Microsoft. All rights reserved. 51 | 52 | ---------- 53 | Connect with me on Twitter [@JasonJohMSFT](https://twitter.com/JasonJohMSFT) 54 | 55 | Follow the [Outlook/Exchange Dev Blog](https://blogs.msdn.microsoft.com/exchangedev/) 56 | -------------------------------------------------------------------------------- /app.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE.txt in the project root for license information. 2 | var express = require('express'); 3 | var path = require('path'); 4 | var favicon = require('serve-favicon'); 5 | var logger = require('morgan'); 6 | var cookieParser = require('cookie-parser'); 7 | var bodyParser = require('body-parser'); 8 | 9 | require('dotenv').config(); 10 | 11 | var index = require('./routes/index'); 12 | var authorize = require('./routes/authorize'); 13 | var mail = require('./routes/mail'); 14 | var calendar = require('./routes/calendar'); 15 | var contacts = require('./routes/contacts'); 16 | 17 | var app = express(); 18 | 19 | // view engine setup 20 | app.set('views', path.join(__dirname, 'views')); 21 | app.set('view engine', 'hbs'); 22 | 23 | // uncomment after placing your favicon in /public 24 | //app.use(favicon(path.join(__dirname, 'public', 'favicon.ico'))); 25 | app.use(logger('dev')); 26 | app.use(bodyParser.json()); 27 | app.use(bodyParser.urlencoded({ extended: false })); 28 | app.use(cookieParser()); 29 | app.use(express.static(path.join(__dirname, 'public'))); 30 | 31 | app.use('/', index); 32 | app.use('/authorize', authorize); 33 | app.use('/mail', mail); 34 | app.use('/calendar', calendar); 35 | app.use('/contacts', contacts); 36 | 37 | // catch 404 and forward to error handler 38 | app.use(function(req, res, next) { 39 | var err = new Error('Not Found'); 40 | err.status = 404; 41 | next(err); 42 | }); 43 | 44 | // error handler 45 | app.use(function(err, req, res, next) { 46 | // set locals, only providing error in development 47 | res.locals.message = err.message; 48 | res.locals.error = req.app.get('env') === 'development' ? err : {}; 49 | 50 | // render the error page 51 | res.status(err.status || 500); 52 | res.render('error'); 53 | }); 54 | 55 | module.exports = app; 56 | -------------------------------------------------------------------------------- /bin/www: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /** 4 | * Module dependencies. 5 | */ 6 | 7 | var app = require('../app'); 8 | var debug = require('debug')('node-tutorial:server'); 9 | var http = require('http'); 10 | 11 | /** 12 | * Get port from environment and store in Express. 13 | */ 14 | 15 | var port = normalizePort(process.env.PORT || '3000'); 16 | app.set('port', port); 17 | 18 | /** 19 | * Create HTTP server. 20 | */ 21 | 22 | var server = http.createServer(app); 23 | 24 | /** 25 | * Listen on provided port, on all network interfaces. 26 | */ 27 | 28 | server.listen(port); 29 | server.on('error', onError); 30 | server.on('listening', onListening); 31 | 32 | /** 33 | * Normalize a port into a number, string, or false. 34 | */ 35 | 36 | function normalizePort(val) { 37 | var port = parseInt(val, 10); 38 | 39 | if (isNaN(port)) { 40 | // named pipe 41 | return val; 42 | } 43 | 44 | if (port >= 0) { 45 | // port number 46 | return port; 47 | } 48 | 49 | return false; 50 | } 51 | 52 | /** 53 | * Event listener for HTTP server "error" event. 54 | */ 55 | 56 | function onError(error) { 57 | if (error.syscall !== 'listen') { 58 | throw error; 59 | } 60 | 61 | var bind = typeof port === 'string' 62 | ? 'Pipe ' + port 63 | : 'Port ' + port; 64 | 65 | // handle specific listen errors with friendly messages 66 | switch (error.code) { 67 | case 'EACCES': 68 | console.error(bind + ' requires elevated privileges'); 69 | process.exit(1); 70 | break; 71 | case 'EADDRINUSE': 72 | console.error(bind + ' is already in use'); 73 | process.exit(1); 74 | break; 75 | default: 76 | throw error; 77 | } 78 | } 79 | 80 | /** 81 | * Event listener for HTTP server "listening" event. 82 | */ 83 | 84 | function onListening() { 85 | var addr = server.address(); 86 | var bind = typeof addr === 'string' 87 | ? 'pipe ' + addr 88 | : 'port ' + addr.port; 89 | debug('Listening on ' + bind); 90 | } 91 | -------------------------------------------------------------------------------- /helpers/auth.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE.txt in the project root for license information. 2 | const credentials = { 3 | client: { 4 | id: process.env.APP_ID, 5 | secret: process.env.APP_PASSWORD, 6 | }, 7 | auth: { 8 | tokenHost: 'https://login.microsoftonline.com', 9 | authorizePath: 'common/oauth2/v2.0/authorize', 10 | tokenPath: 'common/oauth2/v2.0/token' 11 | } 12 | }; 13 | const oauth2 = require('simple-oauth2').create(credentials); 14 | const jwt = require('jsonwebtoken'); 15 | 16 | function getAuthUrl() { 17 | const returnVal = oauth2.authorizationCode.authorizeURL({ 18 | redirect_uri: process.env.REDIRECT_URI, 19 | scope: process.env.APP_SCOPES 20 | }); 21 | console.log(`Generated auth url: ${returnVal}`); 22 | return returnVal; 23 | } 24 | 25 | async function getTokenFromCode(auth_code, res) { 26 | let result = await oauth2.authorizationCode.getToken({ 27 | code: auth_code, 28 | redirect_uri: process.env.REDIRECT_URI, 29 | scope: process.env.APP_SCOPES 30 | }); 31 | 32 | const token = oauth2.accessToken.create(result); 33 | console.log('Token created: ', token.token); 34 | 35 | saveValuesToCookie(token, res); 36 | 37 | return token.token.access_token; 38 | } 39 | 40 | async function getAccessToken(cookies, res) { 41 | // Do we have an access token cached? 42 | let token = cookies.graph_access_token; 43 | 44 | if (token) { 45 | // We have a token, but is it expired? 46 | // Expire 5 minutes early to account for clock differences 47 | const FIVE_MINUTES = 300000; 48 | const expiration = new Date(parseFloat(cookies.graph_token_expires - FIVE_MINUTES)); 49 | if (expiration > new Date()) { 50 | // Token is still good, just return it 51 | return token; 52 | } 53 | } 54 | 55 | // Either no token or it's expired, do we have a 56 | // refresh token? 57 | const refresh_token = cookies.graph_refresh_token; 58 | if (refresh_token) { 59 | const newToken = await oauth2.accessToken.create({refresh_token: refresh_token}).refresh(); 60 | saveValuesToCookie(newToken, res); 61 | return newToken.token.access_token; 62 | } 63 | 64 | // Nothing in the cookies that helps, return empty 65 | return null; 66 | } 67 | 68 | function saveValuesToCookie(token, res) { 69 | // Parse the identity token 70 | const user = jwt.decode(token.token.id_token); 71 | 72 | // Save the access token in a cookie 73 | res.cookie('graph_access_token', token.token.access_token, {maxAge: 3600000, httpOnly: true}); 74 | // Save the user's name in a cookie 75 | res.cookie('graph_user_name', user.name, {maxAge: 3600000, httpOnly: true}); 76 | // Save the refresh token in a cookie 77 | res.cookie('graph_refresh_token', token.token.refresh_token, {maxAge: 7200000, httpOnly: true}); 78 | // Save the token expiration tiem in a cookie 79 | res.cookie('graph_token_expires', token.token.expires_at.getTime(), {maxAge: 3600000, httpOnly: true}); 80 | } 81 | 82 | function clearCookies(res) { 83 | // Clear cookies 84 | res.clearCookie('graph_access_token', {maxAge: 3600000, httpOnly: true}); 85 | res.clearCookie('graph_user_name', {maxAge: 3600000, httpOnly: true}); 86 | res.clearCookie('graph_refresh_token', {maxAge: 7200000, httpOnly: true}); 87 | res.clearCookie('graph_token_expires', {maxAge: 3600000, httpOnly: true}); 88 | } 89 | 90 | exports.getAuthUrl = getAuthUrl; 91 | exports.getTokenFromCode = getTokenFromCode; 92 | exports.getAccessToken = getAccessToken; 93 | exports.clearCookies = clearCookies; -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "node-tutorial", 3 | "version": "0.0.0", 4 | "lockfileVersion": 1, 5 | "requires": true, 6 | "dependencies": { 7 | "@microsoft/microsoft-graph-client": { 8 | "version": "1.0.0", 9 | "resolved": "https://registry.npmjs.org/@microsoft/microsoft-graph-client/-/microsoft-graph-client-1.0.0.tgz", 10 | "integrity": "sha1-HAqrL0KMfLrA1E8mWoEnslhsOA0=", 11 | "requires": { 12 | "es6-promise": "4.2.4", 13 | "superagent": "3.8.2" 14 | } 15 | }, 16 | "accepts": { 17 | "version": "1.3.4", 18 | "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.4.tgz", 19 | "integrity": "sha1-hiRnWMfdbSGmR0/whKR0DsBesh8=", 20 | "requires": { 21 | "mime-types": "2.1.18", 22 | "negotiator": "0.6.1" 23 | } 24 | }, 25 | "ajv": { 26 | "version": "5.5.2", 27 | "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", 28 | "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", 29 | "requires": { 30 | "co": "4.6.0", 31 | "fast-deep-equal": "1.0.0", 32 | "fast-json-stable-stringify": "2.0.0", 33 | "json-schema-traverse": "0.3.1" 34 | } 35 | }, 36 | "align-text": { 37 | "version": "0.1.4", 38 | "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", 39 | "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", 40 | "requires": { 41 | "kind-of": "3.2.2", 42 | "longest": "1.0.1", 43 | "repeat-string": "1.6.1" 44 | } 45 | }, 46 | "amdefine": { 47 | "version": "1.0.1", 48 | "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", 49 | "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=" 50 | }, 51 | "array-flatten": { 52 | "version": "1.1.1", 53 | "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", 54 | "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" 55 | }, 56 | "asn1": { 57 | "version": "0.2.3", 58 | "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", 59 | "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=" 60 | }, 61 | "assert-plus": { 62 | "version": "1.0.0", 63 | "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", 64 | "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" 65 | }, 66 | "async": { 67 | "version": "1.5.2", 68 | "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", 69 | "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=" 70 | }, 71 | "asynckit": { 72 | "version": "0.4.0", 73 | "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", 74 | "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" 75 | }, 76 | "aws-sign2": { 77 | "version": "0.7.0", 78 | "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", 79 | "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" 80 | }, 81 | "aws4": { 82 | "version": "1.6.0", 83 | "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.6.0.tgz", 84 | "integrity": "sha1-g+9cqGCysy5KDe7e6MdxudtXRx4=" 85 | }, 86 | "base64url": { 87 | "version": "2.0.0", 88 | "resolved": "https://registry.npmjs.org/base64url/-/base64url-2.0.0.tgz", 89 | "integrity": "sha1-6sFuA+oUOO/5Qj1puqNiYu0fcLs=" 90 | }, 91 | "basic-auth": { 92 | "version": "2.0.0", 93 | "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.0.tgz", 94 | "integrity": "sha1-AV2z81PgLlY3d1X5YnQuiYHnu7o=", 95 | "requires": { 96 | "safe-buffer": "5.1.1" 97 | } 98 | }, 99 | "bcrypt-pbkdf": { 100 | "version": "1.0.1", 101 | "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz", 102 | "integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=", 103 | "optional": true, 104 | "requires": { 105 | "tweetnacl": "0.14.5" 106 | } 107 | }, 108 | "bluebird": { 109 | "version": "3.5.1", 110 | "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.1.tgz", 111 | "integrity": "sha512-MKiLiV+I1AA596t9w1sQJ8jkiSr5+ZKi0WKrYGUn6d1Fx+Ij4tIj+m2WMQSGczs5jZVxV339chE8iwk6F64wjA==" 112 | }, 113 | "body-parser": { 114 | "version": "1.18.2", 115 | "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.18.2.tgz", 116 | "integrity": "sha1-h2eKGdhLR9hZuDGZvVm84iKxBFQ=", 117 | "requires": { 118 | "bytes": "3.0.0", 119 | "content-type": "1.0.4", 120 | "debug": "2.6.9", 121 | "depd": "1.1.2", 122 | "http-errors": "1.6.2", 123 | "iconv-lite": "0.4.19", 124 | "on-finished": "2.3.0", 125 | "qs": "6.5.1", 126 | "raw-body": "2.3.2", 127 | "type-is": "1.6.16" 128 | } 129 | }, 130 | "boom": { 131 | "version": "4.3.1", 132 | "resolved": "https://registry.npmjs.org/boom/-/boom-4.3.1.tgz", 133 | "integrity": "sha1-T4owBctKfjiJ90kDD9JbluAdLjE=", 134 | "requires": { 135 | "hoek": "4.2.1" 136 | } 137 | }, 138 | "buffer-equal-constant-time": { 139 | "version": "1.0.1", 140 | "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", 141 | "integrity": "sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk=" 142 | }, 143 | "bytes": { 144 | "version": "3.0.0", 145 | "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", 146 | "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=" 147 | }, 148 | "camelcase": { 149 | "version": "1.2.1", 150 | "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", 151 | "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=", 152 | "optional": true 153 | }, 154 | "caseless": { 155 | "version": "0.12.0", 156 | "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", 157 | "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" 158 | }, 159 | "center-align": { 160 | "version": "0.1.3", 161 | "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", 162 | "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", 163 | "optional": true, 164 | "requires": { 165 | "align-text": "0.1.4", 166 | "lazy-cache": "1.0.4" 167 | } 168 | }, 169 | "cliui": { 170 | "version": "2.1.0", 171 | "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", 172 | "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", 173 | "optional": true, 174 | "requires": { 175 | "center-align": "0.1.3", 176 | "right-align": "0.1.3", 177 | "wordwrap": "0.0.2" 178 | }, 179 | "dependencies": { 180 | "wordwrap": { 181 | "version": "0.0.2", 182 | "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", 183 | "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=", 184 | "optional": true 185 | } 186 | } 187 | }, 188 | "co": { 189 | "version": "4.6.0", 190 | "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", 191 | "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" 192 | }, 193 | "combined-stream": { 194 | "version": "1.0.6", 195 | "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz", 196 | "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=", 197 | "requires": { 198 | "delayed-stream": "1.0.0" 199 | } 200 | }, 201 | "component-emitter": { 202 | "version": "1.2.1", 203 | "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.2.1.tgz", 204 | "integrity": "sha1-E3kY1teCg/ffemt8WmPhQOaUJeY=" 205 | }, 206 | "content-disposition": { 207 | "version": "0.5.2", 208 | "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", 209 | "integrity": "sha1-DPaLud318r55YcOoUXjLhdunjLQ=" 210 | }, 211 | "content-type": { 212 | "version": "1.0.4", 213 | "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", 214 | "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" 215 | }, 216 | "cookie": { 217 | "version": "0.3.1", 218 | "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz", 219 | "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=" 220 | }, 221 | "cookie-parser": { 222 | "version": "1.4.3", 223 | "resolved": "https://registry.npmjs.org/cookie-parser/-/cookie-parser-1.4.3.tgz", 224 | "integrity": "sha1-D+MfoZ0AC5X0qt8fU/3CuKIDuqU=", 225 | "requires": { 226 | "cookie": "0.3.1", 227 | "cookie-signature": "1.0.6" 228 | } 229 | }, 230 | "cookie-signature": { 231 | "version": "1.0.6", 232 | "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", 233 | "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" 234 | }, 235 | "cookiejar": { 236 | "version": "2.1.1", 237 | "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.1.tgz", 238 | "integrity": "sha1-Qa1XsbVVlR7BcUEqgZQrHoIA00o=" 239 | }, 240 | "core-util-is": { 241 | "version": "1.0.2", 242 | "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", 243 | "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" 244 | }, 245 | "cryptiles": { 246 | "version": "3.1.2", 247 | "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-3.1.2.tgz", 248 | "integrity": "sha1-qJ+7Ig9c4l7FboxKqKT9e1sNKf4=", 249 | "requires": { 250 | "boom": "5.2.0" 251 | }, 252 | "dependencies": { 253 | "boom": { 254 | "version": "5.2.0", 255 | "resolved": "https://registry.npmjs.org/boom/-/boom-5.2.0.tgz", 256 | "integrity": "sha512-Z5BTk6ZRe4tXXQlkqftmsAUANpXmuwlsF5Oov8ThoMbQRzdGTA1ngYRW160GexgOgjsFOKJz0LYhoNi+2AMBUw==", 257 | "requires": { 258 | "hoek": "4.2.1" 259 | } 260 | } 261 | } 262 | }, 263 | "dashdash": { 264 | "version": "1.14.1", 265 | "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", 266 | "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", 267 | "requires": { 268 | "assert-plus": "1.0.0" 269 | } 270 | }, 271 | "date-fns": { 272 | "version": "1.29.0", 273 | "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-1.29.0.tgz", 274 | "integrity": "sha512-lbTXWZ6M20cWH8N9S6afb0SBm6tMk+uUg6z3MqHPKE9atmsY3kJkTm8vKe93izJ2B2+q5MV990sM2CHgtAZaOw==" 275 | }, 276 | "debug": { 277 | "version": "2.6.9", 278 | "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", 279 | "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", 280 | "requires": { 281 | "ms": "2.0.0" 282 | } 283 | }, 284 | "decamelize": { 285 | "version": "1.2.0", 286 | "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", 287 | "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", 288 | "optional": true 289 | }, 290 | "delayed-stream": { 291 | "version": "1.0.0", 292 | "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", 293 | "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" 294 | }, 295 | "depd": { 296 | "version": "1.1.2", 297 | "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", 298 | "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" 299 | }, 300 | "destroy": { 301 | "version": "1.0.4", 302 | "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", 303 | "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" 304 | }, 305 | "dotenv": { 306 | "version": "5.0.0", 307 | "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-5.0.0.tgz", 308 | "integrity": "sha512-p4A7snaxI9Hnj3GDWhTpckHYcd9WwZDmGPcvJJV3CoRFq0Dvsp96eYgXBl9WbmbJfuxqiZ2WenNaeWSs675ghQ==" 309 | }, 310 | "ecc-jsbn": { 311 | "version": "0.1.1", 312 | "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", 313 | "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", 314 | "optional": true, 315 | "requires": { 316 | "jsbn": "0.1.1" 317 | } 318 | }, 319 | "ecdsa-sig-formatter": { 320 | "version": "1.0.9", 321 | "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.9.tgz", 322 | "integrity": "sha1-S8kmJ07Dtau1AW5+HWCSGsJisqE=", 323 | "requires": { 324 | "base64url": "2.0.0", 325 | "safe-buffer": "5.1.1" 326 | } 327 | }, 328 | "ee-first": { 329 | "version": "1.1.1", 330 | "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", 331 | "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" 332 | }, 333 | "encodeurl": { 334 | "version": "1.0.2", 335 | "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", 336 | "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" 337 | }, 338 | "es6-promise": { 339 | "version": "4.2.4", 340 | "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.4.tgz", 341 | "integrity": "sha512-/NdNZVJg+uZgtm9eS3O6lrOLYmQag2DjdEXuPaHlZ6RuVqgqaVZfgYCepEIKsLqwdQArOPtC3XzRLqGGfT8KQQ==" 342 | }, 343 | "escape-html": { 344 | "version": "1.0.3", 345 | "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", 346 | "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" 347 | }, 348 | "etag": { 349 | "version": "1.8.1", 350 | "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", 351 | "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" 352 | }, 353 | "express": { 354 | "version": "4.15.5", 355 | "resolved": "https://registry.npmjs.org/express/-/express-4.15.5.tgz", 356 | "integrity": "sha1-ZwI1ypWYiQpa6BcLg9tyK4Qu2Sc=", 357 | "requires": { 358 | "accepts": "1.3.4", 359 | "array-flatten": "1.1.1", 360 | "content-disposition": "0.5.2", 361 | "content-type": "1.0.4", 362 | "cookie": "0.3.1", 363 | "cookie-signature": "1.0.6", 364 | "debug": "2.6.9", 365 | "depd": "1.1.2", 366 | "encodeurl": "1.0.2", 367 | "escape-html": "1.0.3", 368 | "etag": "1.8.1", 369 | "finalhandler": "1.0.6", 370 | "fresh": "0.5.2", 371 | "merge-descriptors": "1.0.1", 372 | "methods": "1.1.2", 373 | "on-finished": "2.3.0", 374 | "parseurl": "1.3.2", 375 | "path-to-regexp": "0.1.7", 376 | "proxy-addr": "1.1.5", 377 | "qs": "6.5.0", 378 | "range-parser": "1.2.0", 379 | "send": "0.15.6", 380 | "serve-static": "1.12.6", 381 | "setprototypeof": "1.0.3", 382 | "statuses": "1.3.1", 383 | "type-is": "1.6.16", 384 | "utils-merge": "1.0.0", 385 | "vary": "1.1.2" 386 | }, 387 | "dependencies": { 388 | "qs": { 389 | "version": "6.5.0", 390 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.0.tgz", 391 | "integrity": "sha512-fjVFjW9yhqMhVGwRExCXLhJKrLlkYSaxNWdyc9rmHlrVZbk35YHH312dFd7191uQeXkI3mKLZTIbSvIeFwFemg==" 392 | }, 393 | "statuses": { 394 | "version": "1.3.1", 395 | "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz", 396 | "integrity": "sha1-+vUbnrdKrvOzrPStX2Gr8ky3uT4=" 397 | } 398 | } 399 | }, 400 | "extend": { 401 | "version": "3.0.1", 402 | "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", 403 | "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=" 404 | }, 405 | "extsprintf": { 406 | "version": "1.3.0", 407 | "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", 408 | "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" 409 | }, 410 | "fast-deep-equal": { 411 | "version": "1.0.0", 412 | "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz", 413 | "integrity": "sha1-liVqO8l1WV6zbYLpkp0GDYk0Of8=" 414 | }, 415 | "fast-json-stable-stringify": { 416 | "version": "2.0.0", 417 | "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", 418 | "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" 419 | }, 420 | "finalhandler": { 421 | "version": "1.0.6", 422 | "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.0.6.tgz", 423 | "integrity": "sha1-AHrqM9Gk0+QgF/YkhIrVjSEvgU8=", 424 | "requires": { 425 | "debug": "2.6.9", 426 | "encodeurl": "1.0.2", 427 | "escape-html": "1.0.3", 428 | "on-finished": "2.3.0", 429 | "parseurl": "1.3.2", 430 | "statuses": "1.3.1", 431 | "unpipe": "1.0.0" 432 | }, 433 | "dependencies": { 434 | "statuses": { 435 | "version": "1.3.1", 436 | "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz", 437 | "integrity": "sha1-+vUbnrdKrvOzrPStX2Gr8ky3uT4=" 438 | } 439 | } 440 | }, 441 | "foreachasync": { 442 | "version": "3.0.0", 443 | "resolved": "https://registry.npmjs.org/foreachasync/-/foreachasync-3.0.0.tgz", 444 | "integrity": "sha1-VQKYfchxS+M5IJfzLgBxyd7gfPY=" 445 | }, 446 | "forever-agent": { 447 | "version": "0.6.1", 448 | "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", 449 | "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" 450 | }, 451 | "form-data": { 452 | "version": "2.3.2", 453 | "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz", 454 | "integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=", 455 | "requires": { 456 | "asynckit": "0.4.0", 457 | "combined-stream": "1.0.6", 458 | "mime-types": "2.1.18" 459 | } 460 | }, 461 | "formidable": { 462 | "version": "1.1.1", 463 | "resolved": "https://registry.npmjs.org/formidable/-/formidable-1.1.1.tgz", 464 | "integrity": "sha1-lriIb3w8NQi5Mta9cMTTqI818ak=" 465 | }, 466 | "forwarded": { 467 | "version": "0.1.2", 468 | "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", 469 | "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=" 470 | }, 471 | "fresh": { 472 | "version": "0.5.2", 473 | "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", 474 | "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" 475 | }, 476 | "getpass": { 477 | "version": "0.1.7", 478 | "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", 479 | "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", 480 | "requires": { 481 | "assert-plus": "1.0.0" 482 | } 483 | }, 484 | "handlebars": { 485 | "version": "4.0.5", 486 | "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.0.5.tgz", 487 | "integrity": "sha1-ksbta7FkEQxQ1NjQ+93HCAbG+Oc=", 488 | "requires": { 489 | "async": "1.5.2", 490 | "optimist": "0.6.1", 491 | "source-map": "0.4.4", 492 | "uglify-js": "2.8.29" 493 | } 494 | }, 495 | "har-schema": { 496 | "version": "2.0.0", 497 | "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", 498 | "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" 499 | }, 500 | "har-validator": { 501 | "version": "5.0.3", 502 | "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz", 503 | "integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=", 504 | "requires": { 505 | "ajv": "5.5.2", 506 | "har-schema": "2.0.0" 507 | } 508 | }, 509 | "hawk": { 510 | "version": "6.0.2", 511 | "resolved": "https://registry.npmjs.org/hawk/-/hawk-6.0.2.tgz", 512 | "integrity": "sha512-miowhl2+U7Qle4vdLqDdPt9m09K6yZhkLDTWGoUiUzrQCn+mHHSmfJgAyGaLRZbPmTqfFFjRV1QWCW0VWUJBbQ==", 513 | "requires": { 514 | "boom": "4.3.1", 515 | "cryptiles": "3.1.2", 516 | "hoek": "4.2.1", 517 | "sntp": "2.1.0" 518 | } 519 | }, 520 | "hbs": { 521 | "version": "4.0.1", 522 | "resolved": "https://registry.npmjs.org/hbs/-/hbs-4.0.1.tgz", 523 | "integrity": "sha1-S/2YZQ3IydrESzyprfnAmOi8M7Y=", 524 | "requires": { 525 | "handlebars": "4.0.5", 526 | "walk": "2.3.9" 527 | } 528 | }, 529 | "hoek": { 530 | "version": "4.2.1", 531 | "resolved": "https://registry.npmjs.org/hoek/-/hoek-4.2.1.tgz", 532 | "integrity": "sha512-QLg82fGkfnJ/4iy1xZ81/9SIJiq1NGFUMGs6ParyjBZr6jW2Ufj/snDqTHixNlHdPNwN2RLVD0Pi3igeK9+JfA==" 533 | }, 534 | "http-errors": { 535 | "version": "1.6.2", 536 | "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.2.tgz", 537 | "integrity": "sha1-CgAsyFcHGSp+eUbO7cERVfYOxzY=", 538 | "requires": { 539 | "depd": "1.1.1", 540 | "inherits": "2.0.3", 541 | "setprototypeof": "1.0.3", 542 | "statuses": "1.4.0" 543 | }, 544 | "dependencies": { 545 | "depd": { 546 | "version": "1.1.1", 547 | "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.1.tgz", 548 | "integrity": "sha1-V4O04cRZ8G+lyif5kfPQbnoxA1k=" 549 | } 550 | } 551 | }, 552 | "http-signature": { 553 | "version": "1.2.0", 554 | "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", 555 | "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", 556 | "requires": { 557 | "assert-plus": "1.0.0", 558 | "jsprim": "1.4.1", 559 | "sshpk": "1.13.1" 560 | } 561 | }, 562 | "iconv-lite": { 563 | "version": "0.4.19", 564 | "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.19.tgz", 565 | "integrity": "sha512-oTZqweIP51xaGPI4uPa56/Pri/480R+mo7SeU+YETByQNhDG55ycFyNLIgta9vXhILrxXDmF7ZGhqZIcuN0gJQ==" 566 | }, 567 | "inherits": { 568 | "version": "2.0.3", 569 | "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", 570 | "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" 571 | }, 572 | "ipaddr.js": { 573 | "version": "1.4.0", 574 | "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.4.0.tgz", 575 | "integrity": "sha1-KWrKh4qCGBbluF0KKFqZvP9FgvA=" 576 | }, 577 | "is-buffer": { 578 | "version": "1.1.6", 579 | "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", 580 | "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" 581 | }, 582 | "is-typedarray": { 583 | "version": "1.0.0", 584 | "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", 585 | "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" 586 | }, 587 | "isarray": { 588 | "version": "1.0.0", 589 | "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", 590 | "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" 591 | }, 592 | "isemail": { 593 | "version": "3.1.1", 594 | "resolved": "https://registry.npmjs.org/isemail/-/isemail-3.1.1.tgz", 595 | "integrity": "sha512-mVjAjvdPkpwXW61agT2E9AkGoegZO7SdJGCezWwxnETL58f5KwJ4vSVAMBUL5idL6rTlYAIGkX3n4suiviMLNw==", 596 | "requires": { 597 | "punycode": "2.1.0" 598 | } 599 | }, 600 | "isstream": { 601 | "version": "0.1.2", 602 | "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", 603 | "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" 604 | }, 605 | "joi": { 606 | "version": "12.0.0", 607 | "resolved": "https://registry.npmjs.org/joi/-/joi-12.0.0.tgz", 608 | "integrity": "sha512-z0FNlV4NGgjQN1fdtHYXf5kmgludM65fG/JlXzU6+rwkt9U5UWuXVYnXa2FpK0u6+qBuCmrm5byPNuiiddAHvQ==", 609 | "requires": { 610 | "hoek": "4.2.1", 611 | "isemail": "3.1.1", 612 | "topo": "2.0.2" 613 | } 614 | }, 615 | "jsbn": { 616 | "version": "0.1.1", 617 | "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", 618 | "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", 619 | "optional": true 620 | }, 621 | "json-schema": { 622 | "version": "0.2.3", 623 | "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", 624 | "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" 625 | }, 626 | "json-schema-traverse": { 627 | "version": "0.3.1", 628 | "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", 629 | "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=" 630 | }, 631 | "json-stringify-safe": { 632 | "version": "5.0.1", 633 | "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", 634 | "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" 635 | }, 636 | "jsonwebtoken": { 637 | "version": "8.1.1", 638 | "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.1.1.tgz", 639 | "integrity": "sha512-+ijVOtfLMlCII8LJkvabaKX3+8tGrGjiCTfzoed2D1b/ebKTO1hIYBQUJHbd9dJ9Fa4kH+dhYEd1qDwyzDLUUw==", 640 | "requires": { 641 | "jws": "3.1.4", 642 | "lodash.includes": "4.3.0", 643 | "lodash.isboolean": "3.0.3", 644 | "lodash.isinteger": "4.0.4", 645 | "lodash.isnumber": "3.0.3", 646 | "lodash.isplainobject": "4.0.6", 647 | "lodash.isstring": "4.0.1", 648 | "lodash.once": "4.1.1", 649 | "ms": "2.1.1", 650 | "xtend": "4.0.1" 651 | }, 652 | "dependencies": { 653 | "ms": { 654 | "version": "2.1.1", 655 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", 656 | "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" 657 | } 658 | } 659 | }, 660 | "jsprim": { 661 | "version": "1.4.1", 662 | "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", 663 | "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", 664 | "requires": { 665 | "assert-plus": "1.0.0", 666 | "extsprintf": "1.3.0", 667 | "json-schema": "0.2.3", 668 | "verror": "1.10.0" 669 | } 670 | }, 671 | "jwa": { 672 | "version": "1.1.5", 673 | "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.1.5.tgz", 674 | "integrity": "sha1-oFUs4CIHQs1S4VN3SjKQXDDnVuU=", 675 | "requires": { 676 | "base64url": "2.0.0", 677 | "buffer-equal-constant-time": "1.0.1", 678 | "ecdsa-sig-formatter": "1.0.9", 679 | "safe-buffer": "5.1.1" 680 | } 681 | }, 682 | "jws": { 683 | "version": "3.1.4", 684 | "resolved": "https://registry.npmjs.org/jws/-/jws-3.1.4.tgz", 685 | "integrity": "sha1-+ei5M46KhHJ31kRLFGT2GIDgUKI=", 686 | "requires": { 687 | "base64url": "2.0.0", 688 | "jwa": "1.1.5", 689 | "safe-buffer": "5.1.1" 690 | } 691 | }, 692 | "kind-of": { 693 | "version": "3.2.2", 694 | "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", 695 | "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", 696 | "requires": { 697 | "is-buffer": "1.1.6" 698 | } 699 | }, 700 | "lazy-cache": { 701 | "version": "1.0.4", 702 | "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", 703 | "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", 704 | "optional": true 705 | }, 706 | "lodash.includes": { 707 | "version": "4.3.0", 708 | "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", 709 | "integrity": "sha1-YLuYqHy5I8aMoeUTJUgzFISfVT8=" 710 | }, 711 | "lodash.isboolean": { 712 | "version": "3.0.3", 713 | "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", 714 | "integrity": "sha1-bC4XHbKiV82WgC/UOwGyDV9YcPY=" 715 | }, 716 | "lodash.isinteger": { 717 | "version": "4.0.4", 718 | "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", 719 | "integrity": "sha1-YZwK89A/iwTDH1iChAt3sRzWg0M=" 720 | }, 721 | "lodash.isnumber": { 722 | "version": "3.0.3", 723 | "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", 724 | "integrity": "sha1-POdoEMWSjQM1IwGsKHMX8RwLH/w=" 725 | }, 726 | "lodash.isplainobject": { 727 | "version": "4.0.6", 728 | "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", 729 | "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=" 730 | }, 731 | "lodash.isstring": { 732 | "version": "4.0.1", 733 | "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", 734 | "integrity": "sha1-1SfftUVuynzJu5XV2ur4i6VKVFE=" 735 | }, 736 | "lodash.once": { 737 | "version": "4.1.1", 738 | "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", 739 | "integrity": "sha1-DdOXEhPHxW34gJd9UEyI+0cal6w=" 740 | }, 741 | "longest": { 742 | "version": "1.0.1", 743 | "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", 744 | "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=" 745 | }, 746 | "media-typer": { 747 | "version": "0.3.0", 748 | "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", 749 | "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" 750 | }, 751 | "merge-descriptors": { 752 | "version": "1.0.1", 753 | "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", 754 | "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" 755 | }, 756 | "methods": { 757 | "version": "1.1.2", 758 | "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", 759 | "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" 760 | }, 761 | "mime": { 762 | "version": "1.3.4", 763 | "resolved": "https://registry.npmjs.org/mime/-/mime-1.3.4.tgz", 764 | "integrity": "sha1-EV+eO2s9rylZmDyzjxSaLUDrXVM=" 765 | }, 766 | "mime-db": { 767 | "version": "1.33.0", 768 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz", 769 | "integrity": "sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ==" 770 | }, 771 | "mime-types": { 772 | "version": "2.1.18", 773 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz", 774 | "integrity": "sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ==", 775 | "requires": { 776 | "mime-db": "1.33.0" 777 | } 778 | }, 779 | "minimist": { 780 | "version": "0.0.10", 781 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", 782 | "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=" 783 | }, 784 | "morgan": { 785 | "version": "1.9.0", 786 | "resolved": "https://registry.npmjs.org/morgan/-/morgan-1.9.0.tgz", 787 | "integrity": "sha1-0B+mxlhZt2/PMbPLU6OCGjEdgFE=", 788 | "requires": { 789 | "basic-auth": "2.0.0", 790 | "debug": "2.6.9", 791 | "depd": "1.1.2", 792 | "on-finished": "2.3.0", 793 | "on-headers": "1.0.1" 794 | } 795 | }, 796 | "ms": { 797 | "version": "2.0.0", 798 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", 799 | "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" 800 | }, 801 | "negotiator": { 802 | "version": "0.6.1", 803 | "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz", 804 | "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=" 805 | }, 806 | "oauth-sign": { 807 | "version": "0.8.2", 808 | "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", 809 | "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=" 810 | }, 811 | "on-finished": { 812 | "version": "2.3.0", 813 | "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", 814 | "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", 815 | "requires": { 816 | "ee-first": "1.1.1" 817 | } 818 | }, 819 | "on-headers": { 820 | "version": "1.0.1", 821 | "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.1.tgz", 822 | "integrity": "sha1-ko9dD0cNSTQmUepnlLCFfBAGk/c=" 823 | }, 824 | "optimist": { 825 | "version": "0.6.1", 826 | "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", 827 | "integrity": "sha1-2j6nRob6IaGaERwybpDrFaAZZoY=", 828 | "requires": { 829 | "minimist": "0.0.10", 830 | "wordwrap": "0.0.3" 831 | } 832 | }, 833 | "parseurl": { 834 | "version": "1.3.2", 835 | "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz", 836 | "integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M=" 837 | }, 838 | "path-to-regexp": { 839 | "version": "0.1.7", 840 | "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", 841 | "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" 842 | }, 843 | "performance-now": { 844 | "version": "2.1.0", 845 | "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", 846 | "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" 847 | }, 848 | "process-nextick-args": { 849 | "version": "2.0.0", 850 | "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", 851 | "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==" 852 | }, 853 | "proxy-addr": { 854 | "version": "1.1.5", 855 | "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-1.1.5.tgz", 856 | "integrity": "sha1-ccDuOxAt4/IC87ZPYI0XP8uhqRg=", 857 | "requires": { 858 | "forwarded": "0.1.2", 859 | "ipaddr.js": "1.4.0" 860 | } 861 | }, 862 | "punycode": { 863 | "version": "2.1.0", 864 | "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.0.tgz", 865 | "integrity": "sha1-X4Y+3Im5bbCQdLrXlHvwkFbKTn0=" 866 | }, 867 | "qs": { 868 | "version": "6.5.1", 869 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", 870 | "integrity": "sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A==" 871 | }, 872 | "range-parser": { 873 | "version": "1.2.0", 874 | "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", 875 | "integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4=" 876 | }, 877 | "raw-body": { 878 | "version": "2.3.2", 879 | "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.2.tgz", 880 | "integrity": "sha1-vNYMd9Prk83gBQKVw/N5OJvIj4k=", 881 | "requires": { 882 | "bytes": "3.0.0", 883 | "http-errors": "1.6.2", 884 | "iconv-lite": "0.4.19", 885 | "unpipe": "1.0.0" 886 | } 887 | }, 888 | "readable-stream": { 889 | "version": "2.3.4", 890 | "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.4.tgz", 891 | "integrity": "sha512-vuYxeWYM+fde14+rajzqgeohAI7YoJcHE7kXDAc4Nk0EbuKnJfqtY9YtRkLo/tqkuF7MsBQRhPnPeyjYITp3ZQ==", 892 | "requires": { 893 | "core-util-is": "1.0.2", 894 | "inherits": "2.0.3", 895 | "isarray": "1.0.0", 896 | "process-nextick-args": "2.0.0", 897 | "safe-buffer": "5.1.1", 898 | "string_decoder": "1.0.3", 899 | "util-deprecate": "1.0.2" 900 | } 901 | }, 902 | "repeat-string": { 903 | "version": "1.6.1", 904 | "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", 905 | "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=" 906 | }, 907 | "request": { 908 | "version": "2.83.0", 909 | "resolved": "https://registry.npmjs.org/request/-/request-2.83.0.tgz", 910 | "integrity": "sha512-lR3gD69osqm6EYLk9wB/G1W/laGWjzH90t1vEa2xuxHD5KUrSzp9pUSfTm+YC5Nxt2T8nMPEvKlhbQayU7bgFw==", 911 | "requires": { 912 | "aws-sign2": "0.7.0", 913 | "aws4": "1.6.0", 914 | "caseless": "0.12.0", 915 | "combined-stream": "1.0.6", 916 | "extend": "3.0.1", 917 | "forever-agent": "0.6.1", 918 | "form-data": "2.3.2", 919 | "har-validator": "5.0.3", 920 | "hawk": "6.0.2", 921 | "http-signature": "1.2.0", 922 | "is-typedarray": "1.0.0", 923 | "isstream": "0.1.2", 924 | "json-stringify-safe": "5.0.1", 925 | "mime-types": "2.1.18", 926 | "oauth-sign": "0.8.2", 927 | "performance-now": "2.1.0", 928 | "qs": "6.5.1", 929 | "safe-buffer": "5.1.1", 930 | "stringstream": "0.0.5", 931 | "tough-cookie": "2.3.3", 932 | "tunnel-agent": "0.6.0", 933 | "uuid": "3.2.1" 934 | } 935 | }, 936 | "right-align": { 937 | "version": "0.1.3", 938 | "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", 939 | "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", 940 | "optional": true, 941 | "requires": { 942 | "align-text": "0.1.4" 943 | } 944 | }, 945 | "safe-buffer": { 946 | "version": "5.1.1", 947 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", 948 | "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==" 949 | }, 950 | "send": { 951 | "version": "0.15.6", 952 | "resolved": "https://registry.npmjs.org/send/-/send-0.15.6.tgz", 953 | "integrity": "sha1-IPI6nJJbdiq4JwX+L52yUqzkfjQ=", 954 | "requires": { 955 | "debug": "2.6.9", 956 | "depd": "1.1.2", 957 | "destroy": "1.0.4", 958 | "encodeurl": "1.0.2", 959 | "escape-html": "1.0.3", 960 | "etag": "1.8.1", 961 | "fresh": "0.5.2", 962 | "http-errors": "1.6.2", 963 | "mime": "1.3.4", 964 | "ms": "2.0.0", 965 | "on-finished": "2.3.0", 966 | "range-parser": "1.2.0", 967 | "statuses": "1.3.1" 968 | }, 969 | "dependencies": { 970 | "statuses": { 971 | "version": "1.3.1", 972 | "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.3.1.tgz", 973 | "integrity": "sha1-+vUbnrdKrvOzrPStX2Gr8ky3uT4=" 974 | } 975 | } 976 | }, 977 | "serve-favicon": { 978 | "version": "2.4.5", 979 | "resolved": "https://registry.npmjs.org/serve-favicon/-/serve-favicon-2.4.5.tgz", 980 | "integrity": "sha512-s7F8h2NrslMkG50KxvlGdj+ApSwaLex0vexuJ9iFf3GLTIp1ph/l1qZvRe9T9TJEYZgmq72ZwJ2VYiAEtChknw==", 981 | "requires": { 982 | "etag": "1.8.1", 983 | "fresh": "0.5.2", 984 | "ms": "2.0.0", 985 | "parseurl": "1.3.2", 986 | "safe-buffer": "5.1.1" 987 | } 988 | }, 989 | "serve-static": { 990 | "version": "1.12.6", 991 | "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.12.6.tgz", 992 | "integrity": "sha1-uXN3P2NEmTTaVOW+ul4x2fQhFXc=", 993 | "requires": { 994 | "encodeurl": "1.0.2", 995 | "escape-html": "1.0.3", 996 | "parseurl": "1.3.2", 997 | "send": "0.15.6" 998 | } 999 | }, 1000 | "setprototypeof": { 1001 | "version": "1.0.3", 1002 | "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.0.3.tgz", 1003 | "integrity": "sha1-ZlZ+NwQ+608E2RvWWMDL77VbjgQ=" 1004 | }, 1005 | "simple-oauth2": { 1006 | "version": "1.5.0", 1007 | "resolved": "https://registry.npmjs.org/simple-oauth2/-/simple-oauth2-1.5.0.tgz", 1008 | "integrity": "sha1-mRj4Nlcm3WnpZl9z9nOSyGks30w=", 1009 | "requires": { 1010 | "bluebird": "3.5.1", 1011 | "date-fns": "1.29.0", 1012 | "debug": "3.1.0", 1013 | "joi": "12.0.0", 1014 | "request": "2.83.0" 1015 | }, 1016 | "dependencies": { 1017 | "debug": { 1018 | "version": "3.1.0", 1019 | "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", 1020 | "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", 1021 | "requires": { 1022 | "ms": "2.0.0" 1023 | } 1024 | } 1025 | } 1026 | }, 1027 | "sntp": { 1028 | "version": "2.1.0", 1029 | "resolved": "https://registry.npmjs.org/sntp/-/sntp-2.1.0.tgz", 1030 | "integrity": "sha512-FL1b58BDrqS3A11lJ0zEdnJ3UOKqVxawAkF3k7F0CVN7VQ34aZrV+G8BZ1WC9ZL7NyrwsW0oviwsWDgRuVYtJg==", 1031 | "requires": { 1032 | "hoek": "4.2.1" 1033 | } 1034 | }, 1035 | "source-map": { 1036 | "version": "0.4.4", 1037 | "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", 1038 | "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", 1039 | "requires": { 1040 | "amdefine": "1.0.1" 1041 | } 1042 | }, 1043 | "sshpk": { 1044 | "version": "1.13.1", 1045 | "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.13.1.tgz", 1046 | "integrity": "sha1-US322mKHFEMW3EwY/hzx2UBzm+M=", 1047 | "requires": { 1048 | "asn1": "0.2.3", 1049 | "assert-plus": "1.0.0", 1050 | "bcrypt-pbkdf": "1.0.1", 1051 | "dashdash": "1.14.1", 1052 | "ecc-jsbn": "0.1.1", 1053 | "getpass": "0.1.7", 1054 | "jsbn": "0.1.1", 1055 | "tweetnacl": "0.14.5" 1056 | } 1057 | }, 1058 | "statuses": { 1059 | "version": "1.4.0", 1060 | "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", 1061 | "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==" 1062 | }, 1063 | "string_decoder": { 1064 | "version": "1.0.3", 1065 | "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.3.tgz", 1066 | "integrity": "sha512-4AH6Z5fzNNBcH+6XDMfA/BTt87skxqJlO0lAh3Dker5zThcAxG6mKz+iGu308UKoPPQ8Dcqx/4JhujzltRa+hQ==", 1067 | "requires": { 1068 | "safe-buffer": "5.1.1" 1069 | } 1070 | }, 1071 | "stringstream": { 1072 | "version": "0.0.5", 1073 | "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", 1074 | "integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg=" 1075 | }, 1076 | "superagent": { 1077 | "version": "3.8.2", 1078 | "resolved": "https://registry.npmjs.org/superagent/-/superagent-3.8.2.tgz", 1079 | "integrity": "sha512-gVH4QfYHcY3P0f/BZzavLreHW3T1v7hG9B+hpMQotGQqurOvhv87GcMCd6LWySmBuf+BDR44TQd0aISjVHLeNQ==", 1080 | "requires": { 1081 | "component-emitter": "1.2.1", 1082 | "cookiejar": "2.1.1", 1083 | "debug": "3.1.0", 1084 | "extend": "3.0.1", 1085 | "form-data": "2.3.2", 1086 | "formidable": "1.1.1", 1087 | "methods": "1.1.2", 1088 | "mime": "1.6.0", 1089 | "qs": "6.5.1", 1090 | "readable-stream": "2.3.4" 1091 | }, 1092 | "dependencies": { 1093 | "debug": { 1094 | "version": "3.1.0", 1095 | "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", 1096 | "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", 1097 | "requires": { 1098 | "ms": "2.0.0" 1099 | } 1100 | }, 1101 | "mime": { 1102 | "version": "1.6.0", 1103 | "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", 1104 | "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" 1105 | } 1106 | } 1107 | }, 1108 | "topo": { 1109 | "version": "2.0.2", 1110 | "resolved": "https://registry.npmjs.org/topo/-/topo-2.0.2.tgz", 1111 | "integrity": "sha1-zVYVdSU5BXwNwEkaYhw7xvvh0YI=", 1112 | "requires": { 1113 | "hoek": "4.2.1" 1114 | } 1115 | }, 1116 | "tough-cookie": { 1117 | "version": "2.3.3", 1118 | "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.3.tgz", 1119 | "integrity": "sha1-C2GKVWW23qkL80JdBNVe3EdadWE=", 1120 | "requires": { 1121 | "punycode": "1.4.1" 1122 | }, 1123 | "dependencies": { 1124 | "punycode": { 1125 | "version": "1.4.1", 1126 | "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", 1127 | "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" 1128 | } 1129 | } 1130 | }, 1131 | "tunnel-agent": { 1132 | "version": "0.6.0", 1133 | "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", 1134 | "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", 1135 | "requires": { 1136 | "safe-buffer": "5.1.1" 1137 | } 1138 | }, 1139 | "tweetnacl": { 1140 | "version": "0.14.5", 1141 | "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", 1142 | "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", 1143 | "optional": true 1144 | }, 1145 | "type-is": { 1146 | "version": "1.6.16", 1147 | "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.16.tgz", 1148 | "integrity": "sha512-HRkVv/5qY2G6I8iab9cI7v1bOIdhm94dVjQCPFElW9W+3GeDOSHmy2EBYe4VTApuzolPcmgFTN3ftVJRKR2J9Q==", 1149 | "requires": { 1150 | "media-typer": "0.3.0", 1151 | "mime-types": "2.1.18" 1152 | } 1153 | }, 1154 | "uglify-js": { 1155 | "version": "2.8.29", 1156 | "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", 1157 | "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=", 1158 | "optional": true, 1159 | "requires": { 1160 | "source-map": "0.5.7", 1161 | "uglify-to-browserify": "1.0.2", 1162 | "yargs": "3.10.0" 1163 | }, 1164 | "dependencies": { 1165 | "source-map": { 1166 | "version": "0.5.7", 1167 | "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", 1168 | "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", 1169 | "optional": true 1170 | } 1171 | } 1172 | }, 1173 | "uglify-to-browserify": { 1174 | "version": "1.0.2", 1175 | "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", 1176 | "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", 1177 | "optional": true 1178 | }, 1179 | "unpipe": { 1180 | "version": "1.0.0", 1181 | "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", 1182 | "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" 1183 | }, 1184 | "util-deprecate": { 1185 | "version": "1.0.2", 1186 | "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", 1187 | "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" 1188 | }, 1189 | "utils-merge": { 1190 | "version": "1.0.0", 1191 | "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.0.tgz", 1192 | "integrity": "sha1-ApT7kiu5N1FTVBxPcJYjHyh8ivg=" 1193 | }, 1194 | "uuid": { 1195 | "version": "3.2.1", 1196 | "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.2.1.tgz", 1197 | "integrity": "sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA==" 1198 | }, 1199 | "vary": { 1200 | "version": "1.1.2", 1201 | "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", 1202 | "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" 1203 | }, 1204 | "verror": { 1205 | "version": "1.10.0", 1206 | "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", 1207 | "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", 1208 | "requires": { 1209 | "assert-plus": "1.0.0", 1210 | "core-util-is": "1.0.2", 1211 | "extsprintf": "1.3.0" 1212 | } 1213 | }, 1214 | "walk": { 1215 | "version": "2.3.9", 1216 | "resolved": "https://registry.npmjs.org/walk/-/walk-2.3.9.tgz", 1217 | "integrity": "sha1-MbTbZnjyrgHDnqn7hyWpAx5Vins=", 1218 | "requires": { 1219 | "foreachasync": "3.0.0" 1220 | } 1221 | }, 1222 | "window-size": { 1223 | "version": "0.1.0", 1224 | "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", 1225 | "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=", 1226 | "optional": true 1227 | }, 1228 | "wordwrap": { 1229 | "version": "0.0.3", 1230 | "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", 1231 | "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=" 1232 | }, 1233 | "xtend": { 1234 | "version": "4.0.1", 1235 | "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", 1236 | "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" 1237 | }, 1238 | "yargs": { 1239 | "version": "3.10.0", 1240 | "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", 1241 | "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", 1242 | "optional": true, 1243 | "requires": { 1244 | "camelcase": "1.2.1", 1245 | "cliui": "2.1.0", 1246 | "decamelize": "1.2.0", 1247 | "window-size": "0.1.0" 1248 | } 1249 | } 1250 | } 1251 | } 1252 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "node-tutorial", 3 | "version": "0.0.0", 4 | "private": true, 5 | "scripts": { 6 | "start": "node ./bin/www" 7 | }, 8 | "dependencies": { 9 | "@microsoft/microsoft-graph-client": "^1.0.0", 10 | "body-parser": "~1.18.2", 11 | "cookie-parser": "~1.4.3", 12 | "debug": "~2.6.9", 13 | "dotenv": "^5.0.0", 14 | "express": "~4.15.5", 15 | "hbs": "~4.0.1", 16 | "jsonwebtoken": "^8.1.1", 17 | "morgan": "~1.9.0", 18 | "serve-favicon": "~2.4.5", 19 | "simple-oauth2": "^1.5.0" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /public/stylesheets/style.css: -------------------------------------------------------------------------------- 1 | pre { 2 | word-wrap: break-word; 3 | white-space: pre-wrap; 4 | } -------------------------------------------------------------------------------- /readme-images/new-password.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasonjoh/node-tutorial/cdd0aa44a4402a15c103ad298133d9bdf84d2514/readme-images/new-password.PNG -------------------------------------------------------------------------------- /readme-images/node-tutorial.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasonjoh/node-tutorial/cdd0aa44a4402a15c103ad298133d9bdf84d2514/readme-images/node-tutorial.PNG -------------------------------------------------------------------------------- /routes/authorize.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE.txt in the project root for license information. 2 | var express = require('express'); 3 | var router = express.Router(); 4 | var authHelper = require('../helpers/auth'); 5 | 6 | /* GET /authorize. */ 7 | router.get('/', async function(req, res, next) { 8 | // Get auth code 9 | const code = req.query.code; 10 | 11 | // If code is present, use it 12 | if (code) { 13 | try { 14 | await authHelper.getTokenFromCode(code, res); 15 | // Redirect to home 16 | res.redirect('/'); 17 | } catch (error) { 18 | res.render('error', { title: 'Error', message: 'Error exchanging code for token', error: error }); 19 | } 20 | } else { 21 | // Otherwise complain 22 | res.render('error', { title: 'Error', message: 'Authorization error', error: { status: 'Missing code parameter' } }); 23 | } 24 | }); 25 | 26 | /* GET /authorize/signout */ 27 | router.get('/signout', function(req, res, next) { 28 | authHelper.clearCookies(res); 29 | 30 | // Redirect to home 31 | res.redirect('/'); 32 | }); 33 | 34 | module.exports = router; 35 | -------------------------------------------------------------------------------- /routes/calendar.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE.txt in the project root for license information. 2 | var express = require('express'); 3 | var router = express.Router(); 4 | var authHelper = require('../helpers/auth'); 5 | var graph = require('@microsoft/microsoft-graph-client'); 6 | 7 | /* GET /calendar */ 8 | router.get('/', async function(req, res, next) { 9 | let parms = { title: 'Calendar', active: { calendar: true } }; 10 | 11 | const accessToken = await authHelper.getAccessToken(req.cookies, res); 12 | const userName = req.cookies.graph_user_name; 13 | 14 | if (accessToken && userName) { 15 | parms.user = userName; 16 | 17 | // Initialize Graph client 18 | const client = graph.Client.init({ 19 | authProvider: (done) => { 20 | done(null, accessToken); 21 | } 22 | }); 23 | 24 | // Set start of the calendar view to today at midnight 25 | const start = new Date(new Date().setHours(0,0,0)); 26 | // Set end of the calendar view to 7 days from start 27 | const end = new Date(new Date(start).setDate(start.getDate() + 7)); 28 | 29 | try { 30 | // Get the first 10 events for the coming week 31 | const result = await client 32 | .api(`/me/calendarView?startDateTime=${start.toISOString()}&endDateTime=${end.toISOString()}`) 33 | .top(10) 34 | .select('subject,start,end,attendees') 35 | .orderby('start/dateTime DESC') 36 | .get(); 37 | 38 | parms.events = result.value; 39 | res.render('calendar', parms); 40 | } catch (err) { 41 | parms.message = 'Error retrieving events'; 42 | parms.error = { status: `${err.code}: ${err.message}` }; 43 | parms.debug = JSON.stringify(err.body, null, 2); 44 | res.render('error', parms); 45 | } 46 | 47 | } else { 48 | // Redirect to home 49 | res.redirect('/'); 50 | } 51 | }); 52 | 53 | module.exports = router; -------------------------------------------------------------------------------- /routes/contacts.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE.txt in the project root for license information. 2 | var express = require('express'); 3 | var router = express.Router(); 4 | var authHelper = require('../helpers/auth'); 5 | var graph = require('@microsoft/microsoft-graph-client'); 6 | 7 | /* GET /contacts */ 8 | router.get('/', async function(req, res, next) { 9 | let parms = { title: 'Contacts', active: { contacts: true } }; 10 | 11 | const accessToken = await authHelper.getAccessToken(req.cookies, res); 12 | const userName = req.cookies.graph_user_name; 13 | 14 | if (accessToken && userName) { 15 | parms.user = userName; 16 | 17 | // Initialize Graph client 18 | const client = graph.Client.init({ 19 | authProvider: (done) => { 20 | done(null, accessToken); 21 | } 22 | }); 23 | 24 | try { 25 | // Get the first 10 contacts in alphabetical order 26 | // by given name 27 | const result = await client 28 | .api('/me/contacts') 29 | .top(10) 30 | .select('givenName,surname,emailAddresses') 31 | .orderby('givenName ASC') 32 | .get(); 33 | 34 | parms.contacts = result.value; 35 | res.render('contacts', parms); 36 | } catch (err) { 37 | parms.message = 'Error retrieving contacts'; 38 | parms.error = { status: `${err.code}: ${err.message}` }; 39 | parms.debug = JSON.stringify(err.body, null, 2); 40 | res.render('error', parms); 41 | } 42 | 43 | } else { 44 | // Redirect to home 45 | res.redirect('/'); 46 | } 47 | }); 48 | 49 | module.exports = router; -------------------------------------------------------------------------------- /routes/index.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE.txt in the project root for license information. 2 | var express = require('express'); 3 | var router = express.Router(); 4 | var authHelper = require('../helpers/auth'); 5 | 6 | /* GET home page. */ 7 | router.get('/', async function(req, res, next) { 8 | let parms = { title: 'Home', active: { home: true } }; 9 | 10 | const accessToken = await authHelper.getAccessToken(req.cookies, res); 11 | const userName = req.cookies.graph_user_name; 12 | 13 | if (accessToken && userName) { 14 | parms.user = userName; 15 | parms.debug = `User: ${userName}\nAccess Token: ${accessToken}`; 16 | } else { 17 | parms.signInUrl = authHelper.getAuthUrl(); 18 | parms.debug = parms.signInUrl; 19 | } 20 | 21 | res.render('index', parms); 22 | }); 23 | 24 | module.exports = router; 25 | -------------------------------------------------------------------------------- /routes/mail.js: -------------------------------------------------------------------------------- 1 | // Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE.txt in the project root for license information. 2 | var express = require('express'); 3 | var router = express.Router(); 4 | var authHelper = require('../helpers/auth'); 5 | var graph = require('@microsoft/microsoft-graph-client'); 6 | 7 | /* GET /mail */ 8 | router.get('/', async function(req, res, next) { 9 | let parms = { title: 'Inbox', active: { inbox: true } }; 10 | 11 | const accessToken = await authHelper.getAccessToken(req.cookies, res); 12 | const userName = req.cookies.graph_user_name; 13 | 14 | if (accessToken && userName) { 15 | parms.user = userName; 16 | 17 | // Initialize Graph client 18 | const client = graph.Client.init({ 19 | authProvider: (done) => { 20 | done(null, accessToken); 21 | } 22 | }); 23 | 24 | try { 25 | // Get the 10 newest messages from inbox 26 | const result = await client 27 | .api('/me/mailfolders/inbox/messages') 28 | .top(10) 29 | .select('subject,from,receivedDateTime,isRead') 30 | .orderby('receivedDateTime DESC') 31 | .get(); 32 | 33 | parms.messages = result.value; 34 | res.render('mail', parms); 35 | } catch (err) { 36 | parms.message = 'Error retrieving messages'; 37 | parms.error = { status: `${err.code}: ${err.message}` }; 38 | parms.debug = JSON.stringify(err.body, null, 2); 39 | res.render('error', parms); 40 | } 41 | 42 | } else { 43 | // Redirect to home 44 | res.redirect('/'); 45 | } 46 | }); 47 | 48 | module.exports = router; -------------------------------------------------------------------------------- /sample.env: -------------------------------------------------------------------------------- 1 | APP_ID=YOUR APP ID HERE 2 | APP_PASSWORD=YOUR APP PASSWORD HERE 3 | APP_SCOPES=openid profile offline_access User.Read Mail.Read Calendars.Read Contacts.Read 4 | REDIRECT_URI=http://localhost:3000/authorize -------------------------------------------------------------------------------- /views/calendar.hbs: -------------------------------------------------------------------------------- 1 | {{! Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE.txt in the project root for license information.}} 2 |
Subject | 6 |Start | 7 |End | 8 |Attendees | 9 | 10 | 11 | {{#each events}} 12 |
---|---|---|---|
{{this.subject}} | 14 |{{this.start.dateTime}} ({{this.start.timeZone}}) | 15 |{{this.end.dateTime}} ({{this.end.timeZone}}) | 16 |
17 |
|
25 |
First name | 6 |Last name | 7 |Email addresses | 8 | 9 | 10 | {{#each contacts}} 11 |
---|---|---|
{{this.givenName}} | 13 |{{this.surname}} | 14 |
15 |
|
23 |
{{error.stack}}5 | -------------------------------------------------------------------------------- /views/index.hbs: -------------------------------------------------------------------------------- 1 | {{! Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See LICENSE.txt in the project root for license information.}} 2 |
This sample app shows how to use the Microsoft Graph API to access Outlook data from Node.js
5 | {{#if user}} 6 |Welcome {{user}}!
7 | {{else}} 8 | Click here to login 9 | {{/if}} 10 |{{debug}}
63 | From | 6 |Subject | 7 |Received | 8 | 9 | 10 | {{#each messages}} 11 |
---|---|---|
{{this.from.emailAddress.name}} | 13 |{{this.subject}} | 14 |{{this.receivedDateTime}} | 15 |