Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!
openssl genrsa -des3 -out rootCA.key 4096| // NOTE: this adds a filename and line number to winston's output | |
| // Example output: 'info (routes/index.js:34) GET 200 /index' | |
| var winston = require('winston') | |
| var path = require('path') | |
| var PROJECT_ROOT = path.join(__dirname, '..') | |
| var logger = new winston.logger({ ... }) | |
| // this allows winston to handle output from express' morgan middleware |
| var request = require('supertest'), | |
| should = require('should'), | |
| app = require('../server'); | |
| var Cookies; | |
| describe('Functional Test <Sessions>:', function () { | |
| it('should create user session for valid user', function (done) { | |
| request(app) | |
| .post('/v1/sessions') |
| // Convert from normal to web-safe, strip trailing "="s | |
| function webSafe64(base64) { | |
| return base64.replace(/\+/g, '-').replace(/\//g, '_').replace(/=+$/, ''); | |
| } | |
| // Convert from web-safe to normal, add trailing "="s | |
| function normal64(base64) { | |
| return base64.replace(/\-/g, '+').replace(/_/g, '/') + '=='.substring(0, (3*base64.length)%4); | |
| } |