omniauth-liblynx 1.1.0 → 1.1.2

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: f5ad8747eb1f44e323dd93ac40ea0d24ea0023308e87aeb5a57301a09410594e
4
- data.tar.gz: 0b712061bbd736b5ccbf3ad8e5979682c6d7692d91171bc77cc464fa4484f745
3
+ metadata.gz: ab11931bbefabb72268749280730d25b7898133aaccb5a553afccb9510e97da5
4
+ data.tar.gz: 8e98e10d862436cc8495e61bddacbc52915da9bf181b92af6712e15f15a1a34f
5
5
  SHA512:
6
- metadata.gz: b9468890bd14bf34a883cea65e4527e85d0e5aac39ebc7b9c07e5235b1ac9ab569379d9d84ebdcd055deadd0d3ca040cd3739566316646e1497cff6adbd23eec
7
- data.tar.gz: d9ea0fafbc0e9652852e87170442b1a354faa39298a0fcef94de841c4ce7b6c3a801afdd3c3c46f8d460e9d7371c8dcbc54d3b0242b7cd0013889216cfdb2ce8
6
+ metadata.gz: 9121d014ffa7d3154fee0304ec3f7b572cba936d5ac9f6284e72f31d454b0983e21b307ac28790ce26c2f3a16f562e03a6b3444064632b9c0e4cca46462dfb36
7
+ data.tar.gz: f7e4574ebbe67e16a9adbaabdde83a1e4ff97290d69b1643dde406c715e79b69f5b2a4b41d7aa7dcbf80884986b4aba3fe8bcc9c19c9a70f4b43cc7ebdbd9f5c
@@ -1,3 +1,5 @@
1
+ before_install:
2
+ - gem install bundler
1
3
  deploy:
2
4
  provider: rubygems
3
5
  api_key:
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- omniauth-liblynx (1.1.0)
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.0.8)
35
+ rack (2.2.2)
36
36
  rainbow (3.0.0)
37
- rake (10.5.0)
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 (< 11.0)
56
+ rake (< 14.0)
57
57
  rubocop
58
58
 
59
59
  BUNDLED WITH
60
- 1.17.3
60
+ 2.1.4
@@ -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'
@@ -2,6 +2,6 @@
2
2
 
3
3
  module OmniAuth
4
4
  module LibLynx
5
- VERSION = '1.1.0'
5
+ VERSION = '1.1.2'
6
6
  end
7
7
  end
@@ -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
@@ -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', '< 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.1.0
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: 2019-12-19 00:00:00.000000000 Z
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: '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