UNPKG

passport-acuity-oauth2

Version:
20 lines (17 loc) 366 B
/** * 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.displayName = json.name || ''; profile.emails = [{value: json.email}]; return profile; };