Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Iterator for recoverKeys. Fixes #2

  • Loading branch information...
commit b30c81a4286f13fe54346d368b92fc836f8bcccb 1 parent bd59731
Dean Sofer authored

Showing 2 changed files with 3 additions and 6 deletions. Show diff stats Hide diff stats

  1. +2 5 lib/resteasy.js
  2. +1 1  test/linkedin.test.js
7 lib/resteasy.js
@@ -93,11 +93,8 @@ function escape(params) {
93 93 }
94 94 function recoverKeys(request) {
95 95 prepSession(request);
96   - // TODO: use iterator instead
97   - if (request.session.resteasy[targetApi].oauth_token) {
98   - keys.oauth_token = request.session.resteasy[targetApi].oauth_token;
99   - keys.oauth_token_secret = request.session.resteasy[targetApi].oauth_token_secret;
100   - keys.oauth_authorize_url = request.session.resteasy[targetApi].oauth_authorize_url;
  96 + for (var token in request.session.resteasy[targetApi]) {
  97 + keys[token] = request.session.resteasy[targetApi][token];
101 98 }
102 99 };
103 100
2  test/linkedin.test.js
@@ -33,7 +33,7 @@ app.get('/auth/resteasy/callback', function(request, response) {
33 33 });
34 34
35 35 app.get('/resteasy/me', function(request, response) {
36   - resteasy.read(request, 'people', { id: '12345'}, function(error, data, _response) {
  36 + resteasy.read(request, 'people', { url: 'http://www.linkedin.com/in/deansofer'}, function(error, data, _response) {
37 37 if (error) {
38 38 response.send(error);
39 39 } else {

0 comments on commit b30c81a

Please sign in to comment.
Something went wrong with that request. Please try again.