From 16f77445de6068921751b27686f8059205f0e9f7 Mon Sep 17 00:00:00 2001 From: Jay Lee Date: Mon, 19 Nov 2018 16:37:04 -0500 Subject: [PATCH] added summary field --- lib/omniauth/strategies/linkedin.rb | 5 +++-- spec/omniauth/strategies/linkedin_spec.rb | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/omniauth/strategies/linkedin.rb b/lib/omniauth/strategies/linkedin.rb index 1b16934..0371d6e 100755 --- a/lib/omniauth/strategies/linkedin.rb +++ b/lib/omniauth/strategies/linkedin.rb @@ -15,7 +15,7 @@ class LinkedIn < OmniAuth::Strategies::OAuth2 } option :scope, 'r_basicprofile r_emailaddress' - option :fields, ['id', 'email-address', 'first-name', 'last-name', 'headline', 'location', 'industry', 'picture-url', 'public-profile-url'] + option :fields, ['id', 'email-address', 'first-name', 'last-name', 'headline', 'location', 'industry', 'picture-url', 'public-profile-url', 'summary'] # These are called after authentication has succeeded. If # possible, you should try to set the UID without making @@ -36,7 +36,8 @@ class LinkedIn < OmniAuth::Strategies::OAuth2 :image => raw_info['pictureUrl'], :urls => { 'public_profile' => raw_info['publicProfileUrl'] - } + }, + :summary => raw_info['summary'] } end diff --git a/spec/omniauth/strategies/linkedin_spec.rb b/spec/omniauth/strategies/linkedin_spec.rb index ffc299a..3bc53db 100755 --- a/spec/omniauth/strategies/linkedin_spec.rb +++ b/spec/omniauth/strategies/linkedin_spec.rb @@ -53,6 +53,7 @@ it { expect(subject.info).to have_key :description } it { expect(subject.info).to have_key :image } it { expect(subject.info).to have_key :urls } + it { expect(subject.info).to have_key :summary } end end