omniauth-orcid 1.0.24 → 1.0.25
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/omniauth/orcid/version.rb +1 -1
- data/lib/omniauth/strategies/orcid.rb +5 -5
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2de3f6c44377f7beaffd58677628f0603edf55cf
|
4
|
+
data.tar.gz: c224ce105af0051e65180c807ca6ddd6d51c8460
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 19b815350863875dbb0b2ae6aa4e008cb1702bba84aa4d49307e55c0f57720b4dd17ed2cb722edaff6debaba9eb5b987d6b83da02876d8541a4c3c39998401d3
|
7
|
+
data.tar.gz: e9f2db1b7963cc0ea75b285a23dcb0eba75de3943f6e3ed6f4866246ce97c99819372b8338ac6c8b1f82d69d0e89f58c4cad71479b861baf79f51cb79e2ede75
|
@@ -107,12 +107,12 @@ module OmniAuth
|
|
107
107
|
|
108
108
|
def raw_info
|
109
109
|
info = client.request(:get, "https://pub.orcid.org/v#{API_VERSION}/#{uid}/orcid-bio", headers: { accept: 'application/json' }).parsed || {}
|
110
|
-
|
110
|
+
personal_details = info.fetch('orcid-profile', {}).fetch('orcid-bio', {})
|
111
111
|
|
112
|
-
{ first_name:
|
113
|
-
last_name:
|
114
|
-
description:
|
115
|
-
other_names:
|
112
|
+
{ first_name: personal_details.fetch('given-names', {}).fetch('value', nil),
|
113
|
+
last_name: personal_details.fetch('family-name', {}).fetch('value', nil),
|
114
|
+
description: personal_details.fetch('biography', {}).fetch('value', nil),
|
115
|
+
other_names: personal_details.fetch('other-names', [{}]).map { |other_name| other_name.fetch('other-name', {}).fetch('value', nil) },
|
116
116
|
urls: {}
|
117
117
|
}
|
118
118
|
end
|