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 +4 -4
- data/.gitignore +1 -1
- data/lib/omniauth-owa/version.rb +1 -1
- data/lib/omniauth/strategies/owa.rb +2 -0
- data/spec/omniauth/strategies/owa_spec.rb +14 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e796f48d32c1f6ed8fb75ab66d6b8c800abee7cb
|
4
|
+
data.tar.gz: 197df82a94e3c74c4e9906735e4caba12e71ce18
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7748141cbb7ea6884af521ba159055e69315626e7f5cfd422e2c52c56dc697e2e5e58aec3e0219d1e91a90a5821adb71296e72fa7cb83aa96a04217b790d443c
|
7
|
+
data.tar.gz: 071cf99334e5a6c9d39e77db2bcb77987f0e4a6d0340ecf7db06a535488adb757247b8c49754365ad9be28fa434c17f27e1669ec40f67c4acaae4f8bab36ed57
|
data/.gitignore
CHANGED
data/lib/omniauth-owa/version.rb
CHANGED
@@ -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
|