omniauth-nexaas_id 0.2.0 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/omniauth/strategies/nexaas_id.rb +6 -1
- data/omniauth-nexaas_id.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0e7963ac636559f36b975678f743fd42a5e005d08b3cb48f9212cce998666e5a
|
4
|
+
data.tar.gz: e6bc8df0e12727bd29a50e9d16367f1e9ba8ea3f1767365a7c189eb9c5caf1ea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b88a670531b9e5fa3869dc4741165d80b2006b9d8f82146f6d8ff0caa129efa5b9657ae6b4b77d98a8e0029fc1864c79702c6c9d547f66e1db4358b39fb54e4d
|
7
|
+
data.tar.gz: 9ff99afb7f9dca9443d4d2cac2347b275f1671ad1171e84020f67699d322fd67309697cb2bd1b178040c699f90ae2389925933027a0e5defdd7334aa34fdede9
|
@@ -51,6 +51,11 @@ module OmniAuth
|
|
51
51
|
super
|
52
52
|
end
|
53
53
|
|
54
|
+
def list_emails?
|
55
|
+
options[:list_emails] || options['list_emails'] ||
|
56
|
+
options[:client_options][:list_emails]
|
57
|
+
end
|
58
|
+
|
54
59
|
protected
|
55
60
|
|
56
61
|
def build_access_token
|
@@ -70,7 +75,7 @@ module OmniAuth
|
|
70
75
|
end
|
71
76
|
|
72
77
|
def retrieve_emails(id)
|
73
|
-
return unless
|
78
|
+
return unless list_emails? # guard: access endpoint only if allowed
|
74
79
|
emails = access_token.get('/api/v1/profile/emails').parsed
|
75
80
|
got = email['id']
|
76
81
|
raise "unexpected id #{got} retrieving e-mails for #{id}" unless got == id
|
data/omniauth-nexaas_id.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "omniauth-nexaas_id"
|
7
|
-
spec.version = "0.2.
|
7
|
+
spec.version = "0.2.1"
|
8
8
|
spec.authors = ["Rodrigo Tassinari de Oliveira", "Luiz Carlos Buiatte"]
|
9
9
|
spec.email = ["rodrigo@pittlandia.net", "luiz.buiatte@nexaas.com"]
|
10
10
|
|