omniauth-azure-oauth2 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/README.md +4 -0
- data/lib/omniauth/azure_oauth2/version.rb +1 -1
- data/lib/omniauth/strategies/azure_oauth2.rb +2 -2
- data/spec/omniauth/strategies/azure_oauth2_spec.rb +32 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0d4337c65a6a6f8c0a8830e0f26f877ce6bc27aa
|
4
|
+
data.tar.gz: 6ef8a62f0d742488d59347e33007930e58be9596
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ae389db21019987a9e98bee124606723cab7a0032cc6815b4fdba1f436b9f79ae5890a16c3b89af24c7999cd2194b6ea4c7da5806c84e1abddc835800c31bb2d
|
7
|
+
data.tar.gz: b5bb25ee85b3b9ebaaca7627f8d2d4996d02bb9c3b94e25bb72bb0b99cafd3cd8ebeae8acaf08e023b7633965ef1f72ba3b9ee40985a5eabe8d240f92f5b6862
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -139,3 +139,7 @@ end
|
|
139
139
|
4. Commit your changes and tests (`git commit -am 'Added some feature'`)
|
140
140
|
5. Push to the branch (`git push origin my-new-feature`)
|
141
141
|
6. Create new Pull Request
|
142
|
+
|
143
|
+
## Misc
|
144
|
+
Run tests `bundle exec rake`
|
145
|
+
Push to rubygems `bundle exec rake release`.
|
@@ -53,9 +53,9 @@ module OmniAuth
|
|
53
53
|
|
54
54
|
def raw_info
|
55
55
|
# it's all here in JWT http://msdn.microsoft.com/en-us/library/azure/dn195587.aspx
|
56
|
-
@raw_info ||= JWT.decode(access_token.token, nil, false).first
|
56
|
+
@raw_info ||= ::JWT.decode(access_token.token, nil, false).first
|
57
57
|
end
|
58
58
|
|
59
59
|
end
|
60
60
|
end
|
61
|
-
end
|
61
|
+
end
|
@@ -1,6 +1,12 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
require 'omniauth-azure-oauth2'
|
3
3
|
|
4
|
+
module OmniAuth
|
5
|
+
module Strategies
|
6
|
+
module JWT; end
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
4
10
|
describe OmniAuth::Strategies::AzureOauth2 do
|
5
11
|
let(:request) { double('Request', :params => {}, :cookies => {}, :env => {}) }
|
6
12
|
let(:app) {
|
@@ -125,7 +131,7 @@ describe OmniAuth::Strategies::AzureOauth2 do
|
|
125
131
|
end
|
126
132
|
|
127
133
|
end
|
128
|
-
|
134
|
+
|
129
135
|
describe 'dynamic common configuration' do
|
130
136
|
let(:provider_klass) {
|
131
137
|
Class.new {
|
@@ -156,4 +162,28 @@ describe OmniAuth::Strategies::AzureOauth2 do
|
|
156
162
|
end
|
157
163
|
end
|
158
164
|
end
|
159
|
-
|
165
|
+
|
166
|
+
describe "raw_info" do
|
167
|
+
subject do
|
168
|
+
OmniAuth::Strategies::AzureOauth2.new(app, {client_id: 'id', client_secret: 'secret'})
|
169
|
+
end
|
170
|
+
|
171
|
+
let(:token) do
|
172
|
+
JWT.encode({"some" => "payload"}, "secret")
|
173
|
+
end
|
174
|
+
|
175
|
+
let(:access_token) do
|
176
|
+
double(:token => token)
|
177
|
+
end
|
178
|
+
|
179
|
+
before :each do
|
180
|
+
allow(subject).to receive(:access_token) { access_token }
|
181
|
+
end
|
182
|
+
|
183
|
+
it "does not clash if JWT strategy is used" do
|
184
|
+
expect do
|
185
|
+
subject.info
|
186
|
+
end.to_not raise_error
|
187
|
+
end
|
188
|
+
end
|
189
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-azure-oauth2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mark Nadig
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-01-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: omniauth
|