Skip to content
This repository has been archived by the owner on Sep 24, 2018. It is now read-only.

Commit

Permalink
Merge pull request #7 from yahoo/npm-stuff
Browse files Browse the repository at this point in the history
Npm stuff
  • Loading branch information
prbinu committed Nov 25, 2015
2 parents 74be95e + d81c020 commit 6d7c349
Show file tree
Hide file tree
Showing 10 changed files with 102 additions and 29 deletions.
40 changes: 40 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
language: node_js
node_js:
- '4.1'
- '4.0'
- '0.12'
- '0.11'
- '0.10'

env:
- CXX=g++-4.8

notifications:
email:
recipients:
- a.mahendrakar@yahoo.com
on_success: change
on_failure: always
after_success:
- test $(cat $TRAVIS_BUILD_DIR/package.json | grep version | awk '{print $2}' | sed 's/"//g' | sed 's/,//g' | awk '{print "v"$1}' ) = $TRAVIS_TAG && test $(echo $TRAVIS_NODE_VERSION | awk '{print $1}' ) = '0.12' && export VALID_VERSION=true
deploy:
provider: npm
email: a.mahendrakar@yahoo.com
api_key:
secure: vtgw1h09vxTfht4Ybo8xct0hIxJ99qw4g1ug4EW2+hrOmHD0jvnwNomA2wq74ErnNDJpadji/96q7jjiredrCFtXJr+jJfgWvz9Dj/3DYka5BLZf3mXt4sSZsIa8a4qd4yjps8LSTz8Zn+NdamBmJZF/Tyw1p/KqijpQ8uUt2sN8Oil9Fgb4fZ5cq5Xhv431VqjHD0Q21HB2GDgEFJxCvy5tXCKOfmTwzox/fwf9gTyrkYB27v9UTGxdqJqHrVuPRuaqbOuGIHNfRLc8qZAbtjp/DQmvf/itsI49Pxkm9LERCCAxVum60EEm79VYjSqnpC05ybYW1XjMrScY9Sqz2VBfftZa1bj7awqHw/K2aDmmSjzc7CUK7aJ1pQVy+xmdp9Je+aHqMlYvzy2HLLQYt4SZSn3zaTQFl2x3tkyivaY5i/b/Rf5BasaNxm2fPYI0QVyOZBXojPPULiHqyDdLrMKOpT13n7olPWbTkwwuI++eixP2OqJiSRlMtn3L4Y27x028LgJJaecueVhtrGnC7+9CClod6V4nJvbS2oTWRsP5s8O4A0vfCVGd6fhd7MhOVjR9Wz6jMxKkMrylWYEB6U5lqauQykYVXHl4ndnh/8vTzHWYCKzOm6kd60qQ0DPEzHfFPCVXYN2tPYzML1sFzNl1kCv0kBtTk705cTO3heA=
on:
condition: $VALID_VERSION = true
tags: true
branch: master
sudo: false

addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.8

before_install:
- $CXX --version
- if [ "$TRAVIS_NODE_VERSION" = "0.8" ]; then npm install -g npm@2.7.3; fi;
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@

**[Alpha release, not production ready]**

[![npm version][npm-badge]][npm]
[![dependency status][dep-badge]][dep-status]
[![Build Status](https://travis-ci.org/yahoo/spartan.svg?branch=master)](https://travis-ci.org/yahoo/spartan)

[npm]: https://www.npmjs.org/package/spartan-server
[npm-badge]: https://img.shields.io/npm/v/spartan-server.svg?style=flat-square
[dep-status]: https://david-dm.org/yahoo/spartan
[dep-badge]: https://img.shields.io/david/yahoo/spartan.svg?style=flat-square


<img src="./doc/highlevel-flow.png" width="650">

## Background
Expand Down
2 changes: 1 addition & 1 deletion demo/client/auth-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

"use strict";
var fs = require('fs');
var spartan = require('spartan');
var spartan = require('spartan-api');
var SpartanECDH = require('spartan/ecdh');
var request = require('request');
var svc_url = 'http://localhost:3001/v1/service/auth-test';
Expand Down
2 changes: 1 addition & 1 deletion demo/server/routes/service-auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
var fs = require('fs');
var express = require('express');
var router = express.Router();
var spartan = require('spartan');
var spartan = require('spartan-api');
var SpartanECDH = require('spartan/ecdh');
var config = require('../config');
var utils = require('./router-utils');
Expand Down
1 change: 1 addition & 0 deletions doc/getting-started.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,4 @@ $ cd demo/client
$ node auth-test.js
{ msg: 'app is authenticated!' }
```

46 changes: 46 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"name": "spartan-server",
"version": "0.1.0",
"scripts": {
"start": "node ./server/bin/www",
"test": "echo \"TODO: Add tests here.\" && exit 0"
},
"keywords": [
"spartan",
"authorization",
"authentication",
"auth",
"container"
],
"author": {
"name": "Binu Ramakrishnan"
},
"contributors": [
{"name": "Aditya Mahendrakar"},
{"name": "Binu Ramakrishnan"}
],
"bugs": {
"url": "https://github.com/yahoo/spartan/issues"
},
"license": "BSD-3-Clause",
"dependencies": {
"bcrypt": "^0.8.5",
"body-parser": "~1.8.1",
"cookie-parser": "~1.3.3",
"debug": "~2.0.0",
"express": "~4.9.0",
"jade": "~1.6.0",
"jsonwebtoken": "~5.4.0",
"jws": "^2.0.0",
"morgan": "~1.3.0",
"request": "^2.65.0",
"sequelize": "~3.12.0",
"serve-favicon": "~2.1.3",
"spartan-api": "~0",
"mysql": "^2.9.0",
"request": "^2.65.0",
"sequelize": "~3.12.0",
"serve-favicon": "~2.1.3"
},
"description": "Spartan - A Scalable Client Authentication & Authorization System for Container-based Environments"
}
24 changes: 0 additions & 24 deletions server/package.json

This file was deleted.

2 changes: 1 addition & 1 deletion server/routes/attestation-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ var fs = require('fs');
var express = require('express');
var router = express.Router();
var jwt = require('jsonwebtoken');
var spartan = require('spartan');
var spartan = require('spartan-api');
var config = require('../config.js');
var models = require('../models');
var router_utils = require('./router-utils');
Expand Down
2 changes: 1 addition & 1 deletion server/routes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ var jwt = require('jsonwebtoken');
var config = require('../config.js');
var models = require('../models');
var auth = require('./user-auth');
var spartan = require('spartan');
var spartan = require('spartan-api');
var SpartanECDH = require('spartan/ecdh');

var crypto = require('crypto');
Expand Down
2 changes: 1 addition & 1 deletion server/routes/user-auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

"use strict";
var bcrypt = require('bcrypt');
var spartan = require('spartan');
var spartan = require('spartan-api');
var fs = require('fs');
var config = require('../config');
var utils = require('./router-utils');
Expand Down

0 comments on commit 6d7c349

Please sign in to comment.