Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge branch 'justin.tv'

  • Loading branch information...
commit 081cecd1ab343e1b0b241bdb64cef6628baf99da 2 parents d58c234 + 93a0251
@slickplaid slickplaid authored
Showing with 10 additions and 26 deletions.
  1. +1 −1  README.md
  2. +8 −10 example/server.js
  3. +1 −15 lib/modules/justintv.js
View
2  README.md
@@ -14,7 +14,7 @@ So far, `everyauth` enables you to login via:
- `yahoo`
- `readability`                             (Credits [Alfred Nerstu](https://github.com/alfrednerstu))
- `dropbox`                                    (Credits [Torgeir](https://github.com/torgeir))
- - `justin.tv`                                    (Credits [slickplaid](https://github.com/slickplaid))
+ - `justin.tv`                                  (Credits [slickplaid](https://github.com/slickplaid))
- OAuth2
- `facebook`
- `github`
View
18 example/server.js
@@ -205,16 +205,14 @@ everyauth
})
.redirectPath('/')
-everyauth
- .justintv
- .myHostname('http://local.host:3000')
- .consumerKey(conf.justintv.consumerKey)
- .consumerSecret(conf.justintv.consumerSecret)
- .findOrCreateUser( function (sess, accessToken, accessSecret, justintvUser) {
- return usersByJustintvId[justintvUser.id] ||
- (usersByJustintvId[justintvUser.id] = justintvUser);
- })
- .redirectPath('/')
+everyauth.justintv
+ .consumerKey(conf.justintv.consumerKey)
+ .consumerSecret(conf.justintv.consumerSecret)
+ .findOrCreateUser( function (sess, accessToken, accessSecret, justintvUser) {
+ return usersByJustintvId[justintvUser.id] ||
+ (usersByJustintvId[justintvUser.id] = justintvUser);
+ })
+ .redirectPath('/')
everyauth.box
.apiKey(conf.box.apiKey)
View
16 lib/modules/justintv.js
@@ -1,25 +1,11 @@
-var oauthModule = require('./oauth')
- , OAuth = require('oauth').OAuth;
+var oauthModule = require('./oauth');
var justintv = module.exports =
oauthModule.submodule('justintv')
- .definit( function () {
- this.oauth = new OAuth(
- this.oauthHost() + this.requestTokenPath()
- , this.oauthHost() + this.accessTokenPath()
- , this.consumerKey()
- , this.consumerSecret()
- , '1.0', null, 'HMAC-SHA1', null
- );
- })
.apiHost('http://api.justin.tv')
.oauthHost('http://api.justin.tv')
- .requestTokenPath('/oauth/request_token')
- .authorizePath('/oauth/authorize')
- .accessTokenPath('/oauth/access_token')
-
.entryPath('/auth/justintv')
.callbackPath('/auth/justintv/callback')
Please sign in to comment.
Something went wrong with that request. Please try again.