omniauth-liblynx 1.0.9 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 11545970142088db9bd200baaf2dfea343772fc97053700f2ed4d1d3977a8efd
4
- data.tar.gz: a91fd1a9888f58d4b1693af6cf200b29ced670a37dc4f9ae6bcc31bb60237a2f
3
+ metadata.gz: 9fe8a7ff0d98d67f3d3a0bbcbfcf0127b74e205044082473f54d8aead06c9aeb
4
+ data.tar.gz: 4b22ef815797d872fbdd55d89be01ee0d77c4ca3e5039e22b7e2bf2f50e98171
5
5
  SHA512:
6
- metadata.gz: da39b2d3c6d150fa417986aaf15720f5dc29765bfd14ea5a0b04172f44930419fbf0e4a58b4735b8367252bb8532635d6b6a2d0d58e25a0e2977231d6fbd99bc
7
- data.tar.gz: 2cefeb82e222cbbb6b11911b890d1d6f91690a3fcc85ee316287095f064c73939a6da62b0016f304d1d3e7efffcfb370f195eaf8c472a485dd453f82e08b9499
6
+ metadata.gz: b95cbb585343e303f9ddf16a8c1f0a80a0a59687d0984e43202daed1b4c8b141a1a10285b0a443e216a0b143b8b9bf8817f12bbbb95c29c6d97ecb5714621487
7
+ data.tar.gz: 8999070df31b75707ba43c32e038aec6c4750474fa9e22dd0ca8f9aca6543f57ea028abcc7e991dc818a934fa31b65cf3ce024914e17e5f52a3de3d6ec04835d
data/.rubocop.yml CHANGED
@@ -1,58 +1,22 @@
1
1
  AllCops:
2
2
  TargetRubyVersion: 2.3
3
3
 
4
- Rails:
5
- Enabled: false
6
-
7
- Layout/AlignParameters:
8
- Enabled: false
9
-
10
- Layout/IndentHash:
11
- Enabled: false
12
-
13
- Layout/DotPosition:
14
- Enabled: false
15
-
16
4
  Layout/EmptyLineAfterGuardClause:
17
5
  Enabled: false
18
6
 
19
- Layout/CaseIndentation:
20
- Enabled: false
21
-
22
- Layout/MultilineMethodCallBraceLayout:
23
- Enabled: false
24
-
25
7
  Layout/MultilineMethodCallIndentation:
26
8
  Enabled: false
27
9
 
28
- Layout/MultilineOperationIndentation:
29
- EnforcedStyle: indented
30
-
31
- Style/Encoding:
32
- Enabled: true
33
-
34
- Style/PercentLiteralDelimiters:
35
- Enabled: false
36
-
37
- Style/RegexpLiteral:
10
+ Layout/ArgumentAlignment:
38
11
  Enabled: false
39
12
 
40
- Style/RescueModifier:
13
+ Layout/LineLength:
41
14
  Enabled: false
42
15
 
43
16
  Style/Documentation:
44
17
  Enabled: false
45
18
 
46
- Style/ParallelAssignment:
47
- Enabled: false
48
-
49
- Style/RescueStandardError:
50
- Enabled: false
51
-
52
- Naming/UncommunicativeMethodParamName:
53
- Enabled: false
54
-
55
- Naming/AccessorMethodName:
19
+ Naming/MethodParameterName:
56
20
  Enabled: false
57
21
 
58
22
  Metrics:
data/.travis.yml CHANGED
@@ -1,7 +1,13 @@
1
+ rvm:
2
+ - 2.6
3
+ before_install:
4
+ - gem install bundler
5
+ install:
6
+ - bundle install
1
7
  deploy:
2
8
  provider: rubygems
3
9
  api_key:
4
- secure: s5y9lrj7GWE2rz4U7Eh9It12Sem2bGeuapqdnj8VDoeOfTacRXS+iIcVN/D/xsvi7Pg3oNQRBSz0Ar/5gsK9CEDznHJ0nlth6ocqHqoOy3cDf1eGE5nz/T8Wx67sL73Q5UpYPReWZ0XXm+66ywLOQI+mXUct+iA5FSpBLRzalcS+o0ICtxFOxPZ6XouwjHKjNf4rCFYRvKAKO3rLvH4dzPdQotQ+DSaXtTmzUFANF0HuTcaAEmpNm/VjJ4B8S9WvcYU7vyuThxu5LBBzp33eMTzHSSjKg3QCTzYaJ26dN8TAxhVITwPq8Y3LuqWs8wf0xcUi0t5VokORneAlnSz0oEbDYC6x8gNaJGCszKGQ8nmECB0+cVLF5rxm5ehVIOs+VYgViOn8RinqrqTSCym3FwierA4WfO/6B/xfvRqAk6zd/qJhDjaPChdBM39o5Qs/79avmk9/xWWHTfDZppy7BZ3Hj7R55Zk9x+SUdPP3nMyhNKsbhmTU5jX+4c/7m5tvidz78f5hLIjVrfRmggdZjnqe+lo63rqzprwXCshrpwfv0jvWHZ0LbE+hFfMVfi2xoM8OJNe3ncG1qWeM+Cz4ANjN3E2m2mQcehrWzBFOvP7LWqrHY/MseY1SGrOzJdQ2NuVkwt8UFAj9zWu0/58dPhV6OuDMfjPfmz/CKP5PVHg=
10
+ secure: gSm3W8gnVO4yIaCmZwid9EpvH6Vgex4xof+oqyAwi3rhtR1zNpnPoy2A0fjdkNcue2J3XRVXZoIO98MbqfvxLnTHOOFCutsod8X6jwj5xOp7xcTgiN8YvtH1RA+PwLdpfeoNlZcNjqcQL7RF7IAMQS0RVY3Tg2ioxSAG34TtnJDT7Ci+eSA4iFONhC3EsG8tFh3Ly4Y3dBuuFL3BQiZYYbPUX3gsyVOheBqZ2TcK1+EQyM7bct8hublJ3gb1FLgl15BdKZs/N5uEVkHxWS7rGDV+uqFoqr1uS5fUmp1F4e0P7QXcQTQ51ir6PkONGgwofxWNlMV9JnDD+f3san7hLBMjf1tqDb4fXeZEgRqi7M5FSfvwKaKzFDJ7VZcePUPsKt+xQNS/SA562xxuOPqzrMCEja5N1dINBoypcXZoYVEzkU0ojwHhaIPm89hbx4cH0Ky5vL2fxQzNLQQRw1TjXDy/pxP1h034/T9wKXwzg9R8aY6m3EnFiOrmc7yKHdG4wuWhhtH6eBSb8567TdtF1ArsrFd/Lk3Di7FMDLS7zITwgT6RyKPUvyabC/u98KdMfF0GcZ8ri3UK+XeTHdFU3d7cky4354h4uxwZpyes4r7vHN0Z4DnXqvR/g/OGRqo4TsNoxxCIQ5fM+DJPVTtqgqVOwGKsPfkELYdHLMwgbAo=
5
11
  gem: omniauth-liblynx
6
12
  on:
7
13
  tags: true
data/Gemfile.lock CHANGED
@@ -1,61 +1,67 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- omniauth-liblynx (1.0.9)
4
+ omniauth-liblynx (1.2.1)
5
5
  omniauth (~> 1.9)
6
6
  omniauth-oauth2 (>= 1.4.0, < 2.0)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- ast (2.4.0)
12
- faraday (0.15.4)
13
- multipart-post (>= 1.2, < 3)
14
- hashie (3.6.0)
15
- jaro_winkler (1.5.1)
16
- jwt (2.2.1)
17
- multi_json (1.13.1)
11
+ ast (2.4.2)
12
+ faraday (2.3.0)
13
+ faraday-net_http (~> 2.0)
14
+ ruby2_keywords (>= 0.0.4)
15
+ faraday-net_http (2.0.3)
16
+ hashie (5.0.0)
17
+ jwt (2.3.0)
18
+ multi_json (1.15.0)
18
19
  multi_xml (0.6.0)
19
- multipart-post (2.1.1)
20
- oauth2 (1.4.1)
21
- faraday (>= 0.8, < 0.16.0)
20
+ oauth2 (1.4.9)
21
+ faraday (>= 0.17.3, < 3.0)
22
22
  jwt (>= 1.0, < 3.0)
23
23
  multi_json (~> 1.3)
24
24
  multi_xml (~> 0.5)
25
25
  rack (>= 1.2, < 3)
26
- omniauth (1.9.0)
27
- hashie (>= 3.4.6, < 3.7.0)
26
+ omniauth (1.9.1)
27
+ hashie (>= 3.4.6)
28
28
  rack (>= 1.6.2, < 3)
29
- omniauth-oauth2 (1.6.0)
30
- oauth2 (~> 1.1)
31
- omniauth (~> 1.9)
32
- parallel (1.12.1)
33
- parser (2.5.3.0)
34
- ast (~> 2.4.0)
35
- powerpack (0.1.2)
36
- rack (2.0.7)
37
- rainbow (3.0.0)
38
- rake (10.5.0)
39
- rubocop (0.60.0)
40
- jaro_winkler (~> 1.5.1)
29
+ omniauth-oauth2 (1.7.2)
30
+ oauth2 (~> 1.4)
31
+ omniauth (>= 1.9, < 3)
32
+ parallel (1.22.1)
33
+ parser (3.1.2.0)
34
+ ast (~> 2.4.1)
35
+ rack (2.2.3.1)
36
+ rainbow (3.1.1)
37
+ rake (13.0.6)
38
+ regexp_parser (2.5.0)
39
+ rexml (3.2.5)
40
+ rubocop (1.30.0)
41
41
  parallel (~> 1.10)
42
- parser (>= 2.5, != 2.5.1.1)
43
- powerpack (~> 0.1)
42
+ parser (>= 3.1.0.0)
44
43
  rainbow (>= 2.2.2, < 4.0)
44
+ regexp_parser (>= 1.8, < 3.0)
45
+ rexml (>= 3.2.5, < 4.0)
46
+ rubocop-ast (>= 1.18.0, < 2.0)
45
47
  ruby-progressbar (~> 1.7)
46
- unicode-display_width (~> 1.4.0)
47
- ruby-progressbar (1.10.0)
48
- unicode-display_width (1.4.0)
48
+ unicode-display_width (>= 1.4.0, < 3.0)
49
+ rubocop-ast (1.18.0)
50
+ parser (>= 3.1.1.0)
51
+ ruby-progressbar (1.11.0)
52
+ ruby2_keywords (0.0.5)
53
+ unicode-display_width (2.1.0)
49
54
 
50
55
  PLATFORMS
51
56
  ruby
52
57
  x86_64-darwin-18
58
+ x86_64-darwin-19
53
59
 
54
60
  DEPENDENCIES
55
61
  bundler
56
62
  omniauth-liblynx!
57
- rake (< 11.0)
63
+ rake (< 14.0)
58
64
  rubocop
59
65
 
60
66
  BUNDLED WITH
61
- 1.17.2
67
+ 2.3.14
@@ -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
- if id_body[:email].present?
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=#{id_body[:email]}&institution=#{institution['account_name']}").to_s
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
@@ -2,6 +2,6 @@
2
2
 
3
3
  module OmniAuth
4
4
  module LibLynx
5
- VERSION = '1.0.9'
5
+ VERSION = '1.2.1'
6
6
  end
7
7
  end
@@ -1,2 +1,4 @@
1
- require "omniauth-liblynx/version"
1
+ # frozen_string_literal: true
2
+
3
+ require 'omniauth-liblynx/version'
2
4
  require 'omniauth/strategies/liblynx'
@@ -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|
@@ -6,7 +8,7 @@ Gem::Specification.new do |gem|
6
8
  gem.homepage = 'https://github.com/dsablic/omniauth-liblynx'
7
9
  gem.summary = 'OmniAuth strategy for LibLynx'
8
10
  gem.license = 'MIT'
9
- gem.required_ruby_version = '>= 2.3.0'
11
+ gem.required_ruby_version = '>= 2.6.0'
10
12
 
11
13
  gem.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
12
14
  gem.files = `git ls-files`.split("\n")
@@ -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', '< 11.0'
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.0.9
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Denis Sablic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-05-30 00:00:00.000000000 Z
11
+ date: 2022-05-31 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: '11.0'
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: '11.0'
40
+ version: '14.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rubocop
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -116,14 +116,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
116
116
  requirements:
117
117
  - - ">="
118
118
  - !ruby/object:Gem::Version
119
- version: 2.3.0
119
+ version: 2.6.0
120
120
  required_rubygems_version: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - ">="
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
125
  requirements: []
126
- rubygems_version: 3.0.3
126
+ rubygems_version: 3.0.8
127
127
  signing_key:
128
128
  specification_version: 4
129
129
  summary: OmniAuth strategy for LibLynx