omniauth-owa 0.0.2 → 0.0.3

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
  SHA1:
3
- metadata.gz: f5878cdb9a86f12f3fadab9ee79d19e66c2f7fd2
4
- data.tar.gz: e8897c9397eab34454b259ed0de56c7fe9b097da
3
+ metadata.gz: e796f48d32c1f6ed8fb75ab66d6b8c800abee7cb
4
+ data.tar.gz: 197df82a94e3c74c4e9906735e4caba12e71ce18
5
5
  SHA512:
6
- metadata.gz: df10832c1139b9168aa19b84f36dde383201b391bd98e2db9b1b930e9c81eaef5d852d81d9829f8448008731c56d977e5d95a912f03753dfaffdd4ea23915ee5
7
- data.tar.gz: e1a93a2386d15d4c31bc66ca9d50a8fcb4fc121a9c9c4805686270357c8a5cb2b2900b3d726e0da1f6dc92e9b7f05f736ee2de9e72665d5130d7cbf72f7cc19b
6
+ metadata.gz: 7748141cbb7ea6884af521ba159055e69315626e7f5cfd422e2c52c56dc697e2e5e58aec3e0219d1e91a90a5821adb71296e72fa7cb83aa96a04217b790d443c
7
+ data.tar.gz: 071cf99334e5a6c9d39e77db2bcb77987f0e4a6d0340ecf7db06a535488adb757247b8c49754365ad9be28fa434c17f27e1669ec40f67c4acaae4f8bab36ed57
data/.gitignore CHANGED
@@ -1,3 +1,3 @@
1
1
  Gemfile.lock
2
2
  .rvmrc
3
- omniauth-owa-0.0.1.gem
3
+ omniauth-owa-*.gem
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module Owa
3
- VERSION = "0.0.2"
3
+ VERSION = "0.0.3"
4
4
  end
5
5
  end
@@ -33,6 +33,8 @@ module OmniAuth
33
33
  @info[:email] = details.match(/<td[^>]*>E-mail<\/td><td[^>]*>([^<]*)/)[1]
34
34
  @info[:name] = "#{@info[:first_name]} #{@info[:last_name]}"
35
35
  super
36
+ rescue
37
+ fail! :internal_error
36
38
  end
37
39
 
38
40
  uid do
@@ -8,6 +8,7 @@ require "omniauth/strategies/owa"
8
8
 
9
9
  describe OmniAuth::Strategies::OWA do
10
10
  include Rack::Test::Methods
11
+ OmniAuth.config.logger = Logger.new "/dev/null"
11
12
 
12
13
  let(:app) do
13
14
  Rack::Builder.new do |b|
@@ -100,5 +101,18 @@ describe OmniAuth::Strategies::OWA do
100
101
  expect(last_response.location).to eq "/auth/failure?message=invalid_credentials&strategy=owa"
101
102
  end
102
103
  end
104
+
105
+ context "when response parsing fails" do
106
+ before do
107
+ stub_request(:get, "https://fred:secret@mail.example.com/owa/?ae=Dialog&t=AddressBook&ctx=1&sch=fred").
108
+ to_return body: "Some gibbersish"
109
+ post "/auth/owa/callback", uid: "fred", password: "secret"
110
+ end
111
+
112
+ it "fails with 'internal_error'" do
113
+ expect(last_response).to be_redirect
114
+ expect(last_response.location).to eq "/auth/failure?message=internal_error&strategy=owa"
115
+ end
116
+ end
103
117
  end
104
118
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-owa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kerry Buckley