diff options
| author | nanalelfe <nargiza.nosirova@mail.utoronto.ca> | 2016-07-27 12:46:04 +0000 |
|---|---|---|
| committer | nanalelfe <nargiza.nosirova@mail.utoronto.ca> | 2016-07-27 12:46:04 +0000 |
| commit | 7bee9b7e0968b650b3dbe2e35bf3a0d7d6e5e00e (patch) | |
| tree | 4e63af46a6e306bfeac1ef4b8bd83e1b45a37257 /node_modules/passport-google-oauth20/lib/profile | |
| parent | 6520aa92a114d65b17b178a952c8985e84afd231 (diff) | |
Removed some unused modules with prune
Diffstat (limited to 'node_modules/passport-google-oauth20/lib/profile')
| -rw-r--r-- | node_modules/passport-google-oauth20/lib/profile/googleplus.js | 47 | ||||
| -rw-r--r-- | node_modules/passport-google-oauth20/lib/profile/openid.js | 40 |
2 files changed, 0 insertions, 87 deletions
diff --git a/node_modules/passport-google-oauth20/lib/profile/googleplus.js b/node_modules/passport-google-oauth20/lib/profile/googleplus.js deleted file mode 100644 index 0607ba1..0000000 --- a/node_modules/passport-google-oauth20/lib/profile/googleplus.js +++ /dev/null @@ -1,47 +0,0 @@ -/** - * Parse profile. - * - * Parses user profiles as fetched from Google's Google+ API. - * - * The amount of detail in the profile varies based on the scopes granted by the - * user. The following scope values add additional data: - * - * `https://www.googleapis.com/auth/plus.login` - recommended login scope - * `profile` - basic profile information - * `email` - email address - * - * References: - * - https://developers.google.com/+/web/api/rest/latest/people/get - * - https://developers.google.com/+/web/api/rest/ - * - https://developers.google.com/+/web/api/rest/oauth - * - * @param {object|string} json - * @return {object} - * @access public - */ -exports.parse = function(json) { - if ('string' == typeof json) { - json = JSON.parse(json); - } - - var profile = {} - , i, len; - profile.id = json.id; - profile.displayName = json.displayName; - if (json.name) { - profile.name = { familyName: json.name.familyName, - givenName: json.name.givenName }; - } - if (json.emails) { - profile.emails = []; - for (i = 0, len = json.emails.length; i < len; ++i) { - profile.emails.push({ value: json.emails[i].value, type: json.emails[i].type }) - } - } - if (json.image) { - profile.photos = [{ value: json.image.url }]; - } - profile.gender = json.gender; - - return profile; -}; diff --git a/node_modules/passport-google-oauth20/lib/profile/openid.js b/node_modules/passport-google-oauth20/lib/profile/openid.js deleted file mode 100644 index 2056feb..0000000 --- a/node_modules/passport-google-oauth20/lib/profile/openid.js +++ /dev/null @@ -1,40 +0,0 @@ -/** - * Parse profile. - * - * Parses user profiles as fetched from Google's OpenID Connect-compatible user - * info endpoint. - * - * The amount of detail in the profile varies based on the scopes granted by the - * user. The following scope values add additional data: - * - * `profile` - basic profile information - * `email` - email address - * - * References: - * - https://developers.google.com/identity/protocols/OpenIDConnect - * - * @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.sub; - profile.displayName = json.name; - if (json.family_name || json.given_name) { - profile.name = { familyName: json.family_name, - givenName: json.given_name }; - } - if (json.email) { - profile.emails = [ { value: json.email, verified: json.email_verified } ]; - } - if (json.picture) { - profile.photos = [{ value: json.picture }]; - } - - return profile; -}; |
