omniauth-eloqua 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 956b8e32e12bae3720cbf7e3b1b829a701a8dfb75b4bf751edc1c3c1f9454c58
4
- data.tar.gz: d0adfb75ed8807f93375a49863b91827fbe2a8a8dcf57099ad61785df41f6508
3
+ metadata.gz: 2f3d41cf164340116b3cf601e681d8f7c85dd442a7e82a2217456a9e747d9669
4
+ data.tar.gz: 9866d9fe9bb65bda2a5e520f5ab757d1ce881d3536f8dc6517fd71adbdce1d9f
5
5
  SHA512:
6
- metadata.gz: 269b9452f60be9ab55eeb8b5050e8b6e3b45a161d6c1c4dd775fc1519f503b5ddb1d2223f13ee9682f9bed7820bb6fe39ad97820841b21af3eed623b7af49ab7
7
- data.tar.gz: ef26890aa1eec07809969c9c734c259942ab5b755ff77866b4f8d2b16314d52b14048f6e3debc3b7409d2bba601662d93d4baf1f17eec1a8172a294f8f1fae9b
6
+ metadata.gz: f2f7930aa56c78d7115f53136ae941e159643cb0a6b44ded0c8cc91f1533fa4d6b0a5bbd3458826740380603b3baf3b9b65f681cebc994fe96e5f9a8b0b11397
7
+ data.tar.gz: 358811d2b0c36e358ed716ce086ea8020b3bd8bf421a4c62568c48f914356d888d967c13d0d30aec1f0554fc00688e226f18f58e2d7f1996327624ad2dbbdf65
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module Eloqua
3
- VERSION = "0.2.0"
3
+ VERSION = "0.2.1"
4
4
  end
5
5
  end
@@ -59,8 +59,12 @@ module OmniAuth
59
59
  end
60
60
  @access_token = result
61
61
  result = JSON.parse(result.body)
62
- env['omniauth.auth'] = auth_hash(result)
63
- call_app!
62
+ if @access_token.status != 200
63
+ fail!(result['error'], Exception.new(result['error_description']))
64
+ else
65
+ env['omniauth.auth'] = auth_hash(result)
66
+ call_app!
67
+ end
64
68
  end
65
69
  rescue ::OAuth2::Error, CallbackError => e
66
70
  fail!(:invalid_credentials, e)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-eloqua
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Waqas Ali
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-07-05 00:00:00.000000000 Z
11
+ date: 2018-08-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth