omniauth-orcid 1.0.26 → 1.0.27
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 +4 -4
- 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: 236c44683b914245ce9d81d36a4a101c1e697a59
|
4
|
+
data.tar.gz: 75a18a56830e6313b2af49fa1f924d0040909270
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2e7a9099f5a52648baf4dfe611d8c41e810f6002bb050b26168304629ae5605651587a051bea1d11bf27c2692332bd1c3cdac0cd2caddc78ce9e1eb0b740b544
|
7
|
+
data.tar.gz: c1bb88e1b5de7965e95514cb9c07c7b4f48bf5af275f1e28ee52892d12e149301f69783b9351c9b27816ca5a6dffb89170aaff90fc06074fdf460e4441aac0da
|
@@ -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
|
+
orcid_bio = info.fetch('orcid-profile', {}).fetch('orcid-bio', {})
|
111
111
|
|
112
|
-
{ first_name:
|
113
|
-
last_name:
|
112
|
+
{ first_name: orcid_bio.fetch('personal-details', {}).fetch('given-names', {}).fetch('value', nil),
|
113
|
+
last_name: orcid_bio.fetch('personal-details', {}).fetch('family-name', {}).fetch('value', nil),
|
114
|
+
other_names: orcid_bio.fetch('personal-details', {}).fetch('other-names', [{}]).map { |other_name| other_name.fetch('other-name', {}).fetch('value', nil) },
|
114
115
|
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
|