Skip to content

Commit

Permalink
Merge PR liamcurry#25
Browse files Browse the repository at this point in the history
  • Loading branch information
welps committed Feb 2, 2016
2 parents 57d2940 + 5178b84 commit 7ece01f
Show file tree
Hide file tree
Showing 9 changed files with 90 additions and 60 deletions.
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ docs/
examples/
support/
test/
npm-debug.log
17 changes: 13 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
language: "node_js"
language: node_js

node_js:
- 0.4
- 0.6
- 0.8
- 5.4.1
- 4.2.4

deploy:
provider: npm
email: "toby@nerdping.com"
api_key:
secure: horC+ViRqUeN3eFbwUdhJ9qAR6xuZIa+Rcs+5/ly6BN2zBz/Tajv68twsWU/QFMH46gvnXoa3ooVD4CqWsPlqpfKcPt8JdiJ05SKNC3WwibTKX0EpA/z/8gS5HlLIiv24gE28hOKxXRmMLSxtVAMAPELkfR1/S6b1LtgAX4G8dzUEqfl3wZ29Gb2lpQp/Yqyj0hG5dCt4z5bRzHC6EaTn7DLvw6ZUB3ZaPspsCtJJdZTMpfPgkyn0GZJsxaANGEgI2uVB8Xr2a54rvfjiSAgvkbzltg0Nt4rm3EMoZ3n0vHcekVRDh52vlMJc1EK86l3gwaO+AAKNCs+zm75EE5Bx+uGyG8DdExzPc4etIGtbGjzJ0LPICdc0c4YiCyDtKaORQsYAVYfHERZNDcinL33u/aZHss48H0yEuazoxDZ3MZp67EKj+FLawf8Ju3LnNGeheVZ3kg0pUV/OUaSl0yN5LrGPNzqLsk5gHYFNdX9AZW7mf3nI1vQRZhxy7tH1llJmN6PBm9QQ6TgQgDoodMHWvKunn6vH+Ef9lsA4HchOHmJF9U9rDFOcG199J6pmntOSTel2ebS+x5MRAONP3A/9Cz6sbFwC2dckLRtRgqBWG5iF/ZHh1WV8Oz5mXjIKqjFVI0ujBrDVdZw3SnSf4vBvR7JryY73/rGKwaXS0gcwOo=
on:
tags: true
branch: production
19 changes: 11 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
# Passport-Steam

[Passport](https://github.com/jaredhanson/passport) strategy for authenticating
with [Steam](http://steamcommunity.com/) using OpenID 2.0. This was mostly copied
and pasted from passport-google, so don't blame me if things break.
with [Steam](http://steamcommunity.com/) using OpenID 2.0.


## Installation

$ npm install passport-steam
$ npm install --save passport-steam

## Usage

Expand All @@ -30,8 +29,7 @@ Additionally, options can be supplied to specify a return URL and realm.
}
));

A Steam API key can be obtained at http://steamcommunity.com/dev/apikey. You
can use the strategy without a key if you pass ``profile: false`` instead.
A Steam API key can be obtained at http://steamcommunity.com/dev/apikey. However if you wish not to use an API key, you can include `profile: false` into the SteamStrategy object, which will disable the fetching of user data.

#### Authenticate Requests

Expand Down Expand Up @@ -61,15 +59,20 @@ For a complete, working example, refer to the [signon example](https://github.co

## Tests

$ npm install --dev
$ make test
If you would like to contribute, please provide accompanying tests with [AVA](https://github.com/sindresorhus/ava)

[![Build Status](https://secure.travis-ci.org/liamcurry/passport-steam.png)](http://travis-ci.org/liamcurry/passport-liamcurry)
$ npm install -g ava
$ ava


[![Build Status](https://secure.travis-ci.org/liamcurry/passport-steam.png)](http://travis-ci.org/liamcurry/passport-steam)

## Contributors

- [Jared Hanson](http://github.com/jaredhanson)
- [elisee](https://github.com/elisee)
- [welps](https://github.com/welps)
- [mnzt](https://github.com/mnzt)

## License

Expand Down
3 changes: 2 additions & 1 deletion lib/passport-steam/strategy.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ function Strategy(options, validate) {
OpenIDStrategy.call(this, options, validate);
}

this.name = 'steam';
this._name = 'steam';
this._stateless = options.stateless;
}

/**
Expand Down
41 changes: 33 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,24 @@
{
"name": "passport-steam",
"version": "0.1.7",
"version": "1.0.0",
"description": "Steam (OpenID) authentication strategy for Passport.",
"author": { "name": "Liam Curry", "email": "liam@curry.name", "url": "http://www.liamcurry.com/" },
"author": {
"name": "Liam Curry",
"email": "liam@curry.name",
"url": "http://www.liamcurry.com/"
},
"contributors": [{
"name": "Toby Archer",
"email": "toby@nerdping.com",
"url": "http://github.com/mnzt"
}, {
"name": "Welps",
"url": "https://github.com/welps"
}],
"ava": {
"failFast": true,
"verbose": true
},
"repository": {
"type": "git",
"url": "git://github.com/liamcurry/passport-steam.git"
Expand All @@ -17,15 +33,24 @@
"steam-web": "~0.2.4"
},
"devDependencies": {
"vows": "0.6.x"
"ava": "^0.10.0"
},
"scripts": {
"test": "NODE_PATH=lib node_modules/.bin/vows test/*-test.js"
"test": "ava test/*.test.js"
},
"engines": {
"node": ">= 0.4.0"
},
"engines": { "node": ">= 0.4.0" },
"licenses": [ {
"licenses": [{
"type": "MIT",
"url": "http://www.opensource.org/licenses/MIT"
} ],
"keywords": ["passport", "steam", "auth", "authn", "authentication", "identity"]
}],
"keywords": [
"passport",
"steam",
"auth",
"authn",
"authentication",
"identity"
]
}
15 changes: 0 additions & 15 deletions test/index-test.js

This file was deleted.

7 changes: 7 additions & 0 deletions test/index.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
var steam = require('../lib/passport-steam/index.js');

import test from 'ava';

test('Checking version type is string', t => {
t.same(typeof steam.version, "string")
});
24 changes: 0 additions & 24 deletions test/strategy-test.js

This file was deleted.

23 changes: 23 additions & 0 deletions test/strategy.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
var SteamStrategy = require('../lib/passport-steam/strategy');
import test from 'ava';

function getStrategy () {
return new SteamStrategy({
returnURL: 'https://www.example.com/auth/steam/return',
profile: false
},
function() {}
);
}

test("Whether the providerURL is steam's", t => {
t.same(getStrategy()._providerURL, 'http://steamcommunity.com/openid')
});

test("Whether the strategy name is 'steam'", t => {
t.same(getStrategy()._name, 'steam')
})

test("Whether OpenID is statless", t => {
t.same(getStrategy()._stateless, true)
})

0 comments on commit 7ece01f

Please sign in to comment.