omniauth-liblynx 1.1.0 → 1.1.2
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/.travis.yml +2 -0
- data/Gemfile.lock +5 -5
- data/lib/omniauth-liblynx.rb +3 -1
- data/lib/omniauth-liblynx/version.rb +1 -1
- data/lib/omniauth/strategies/liblynx.rb +4 -2
- data/omniauth-liblynx.gemspec +3 -1
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ab11931bbefabb72268749280730d25b7898133aaccb5a553afccb9510e97da5
|
|
4
|
+
data.tar.gz: 8e98e10d862436cc8495e61bddacbc52915da9bf181b92af6712e15f15a1a34f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9121d014ffa7d3154fee0304ec3f7b572cba936d5ac9f6284e72f31d454b0983e21b307ac28790ce26c2f3a16f562e03a6b3444064632b9c0e4cca46462dfb36
|
|
7
|
+
data.tar.gz: f7e4574ebbe67e16a9adbaabdde83a1e4ff97290d69b1643dde406c715e79b69f5b2a4b41d7aa7dcbf80884986b4aba3fe8bcc9c19c9a70f4b43cc7ebdbd9f5c
|
data/.travis.yml
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
omniauth-liblynx (1.1.
|
|
4
|
+
omniauth-liblynx (1.1.2)
|
|
5
5
|
omniauth (~> 1.9)
|
|
6
6
|
omniauth-oauth2 (>= 1.4.0, < 2.0)
|
|
7
7
|
|
|
@@ -32,9 +32,9 @@ GEM
|
|
|
32
32
|
parallel (1.19.1)
|
|
33
33
|
parser (2.6.5.0)
|
|
34
34
|
ast (~> 2.4.0)
|
|
35
|
-
rack (2.
|
|
35
|
+
rack (2.2.2)
|
|
36
36
|
rainbow (3.0.0)
|
|
37
|
-
rake (
|
|
37
|
+
rake (13.0.1)
|
|
38
38
|
rubocop (0.78.0)
|
|
39
39
|
jaro_winkler (~> 1.5.1)
|
|
40
40
|
parallel (~> 1.10)
|
|
@@ -53,8 +53,8 @@ PLATFORMS
|
|
|
53
53
|
DEPENDENCIES
|
|
54
54
|
bundler
|
|
55
55
|
omniauth-liblynx!
|
|
56
|
-
rake (<
|
|
56
|
+
rake (< 14.0)
|
|
57
57
|
rubocop
|
|
58
58
|
|
|
59
59
|
BUNDLED WITH
|
|
60
|
-
1.
|
|
60
|
+
2.1.4
|
data/lib/omniauth-liblynx.rb
CHANGED
|
@@ -50,13 +50,15 @@ module OmniAuth
|
|
|
50
50
|
res = access_token
|
|
51
51
|
.request(:post, options.id_url, body: id_body)
|
|
52
52
|
.parsed
|
|
53
|
-
|
|
53
|
+
email = id_body[:email] || ''
|
|
54
|
+
if email.present?
|
|
54
55
|
institution = res['user_institution']
|
|
55
56
|
return fail!(:no_institution, NoInstitution.new) unless institution
|
|
57
|
+
account_name = institution['account_name']
|
|
56
58
|
log(:info, "User institution: #{institution}")
|
|
57
59
|
end
|
|
58
60
|
id = res['id']
|
|
59
|
-
url = URI.join(callback_url, "?email=#{
|
|
61
|
+
url = URI.join(callback_url, "?email=#{CGI.escape(email)}&institution=#{CGI.escape(account_name.to_s)}").to_s
|
|
60
62
|
hmac = OpenSSL::HMAC.hexdigest('SHA256', client.secret, url)
|
|
61
63
|
redirect("#{client.site}/wayf/#{id}?url=#{CGI.escape(url)}&hash=#{hmac}")
|
|
62
64
|
end
|
data/omniauth-liblynx.gemspec
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
1
3
|
require File.expand_path('lib/omniauth-liblynx/version', __dir__)
|
|
2
4
|
|
|
3
5
|
Gem::Specification.new do |gem|
|
|
@@ -16,7 +18,7 @@ Gem::Specification.new do |gem|
|
|
|
16
18
|
gem.version = OmniAuth::LibLynx::VERSION
|
|
17
19
|
|
|
18
20
|
gem.add_development_dependency 'bundler'
|
|
19
|
-
gem.add_development_dependency 'rake', '<
|
|
21
|
+
gem.add_development_dependency 'rake', '< 14.0'
|
|
20
22
|
gem.add_development_dependency 'rubocop'
|
|
21
23
|
|
|
22
24
|
gem.add_dependency 'omniauth', '~> 1.9'
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: omniauth-liblynx
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.1.
|
|
4
|
+
version: 1.1.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Denis Sablic
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2020-03-17 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -30,14 +30,14 @@ dependencies:
|
|
|
30
30
|
requirements:
|
|
31
31
|
- - "<"
|
|
32
32
|
- !ruby/object:Gem::Version
|
|
33
|
-
version: '
|
|
33
|
+
version: '14.0'
|
|
34
34
|
type: :development
|
|
35
35
|
prerelease: false
|
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
37
|
requirements:
|
|
38
38
|
- - "<"
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
|
-
version: '
|
|
40
|
+
version: '14.0'
|
|
41
41
|
- !ruby/object:Gem::Dependency
|
|
42
42
|
name: rubocop
|
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|