aboutsummaryrefslogtreecommitdiff
path: root/node_modules/passport-facebook/lib/profile.js
diff options
context:
space:
mode:
authorKumar Damani <kumar.damani@mail.utoronto.ca>2019-04-16 13:17:06 +0000
committerKumar Damani <kumar.damani@mail.utoronto.ca>2019-04-16 13:17:06 +0000
commitdc46b87abee1e441c07524ddde67fd902a919336 (patch)
tree13eba08b8655dfd78e9600ec5f612011a0bf3b35 /node_modules/passport-facebook/lib/profile.js
parent26f4b38e9e5a202756a7c33abc775aea2617aeaf (diff)
added some dependencies to package.json
Diffstat (limited to 'node_modules/passport-facebook/lib/profile.js')
-rw-r--r--node_modules/passport-facebook/lib/profile.js38
1 files changed, 0 insertions, 38 deletions
diff --git a/node_modules/passport-facebook/lib/profile.js b/node_modules/passport-facebook/lib/profile.js
deleted file mode 100644
index ef00860..0000000
--- a/node_modules/passport-facebook/lib/profile.js
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
- * Parse profile.
- *
- * @param {object|string} json
- * @return {object}
- * @access public
- */
-exports.parse = function(json) {
- if ('string' == typeof json) {
- json = JSON.parse(json);
- }
-
- var profile = {};
- profile.id = json.id;
- profile.username = json.username;
- profile.displayName = json.name;
- profile.name = { familyName: json.last_name,
- givenName: json.first_name,
- middleName: json.middle_name };
-
- profile.gender = json.gender;
- profile.profileUrl = json.link;
-
- if (json.email) {
- profile.emails = [{ value: json.email }];
- }
-
- if (json.picture) {
- if (typeof json.picture == 'object' && json.picture.data) {
- // October 2012 Breaking Changes
- profile.photos = [{ value: json.picture.data.url }];
- } else {
- profile.photos = [{ value: json.picture }];
- }
- }
-
- return profile;
-};