omniauth-microsoft_graph 0.1.1 → 0.2.0
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.
Potentially problematic release.
This version of omniauth-microsoft_graph might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/.travis.yml +0 -1
- data/lib/omniauth/microsoft_graph/version.rb +1 -1
- data/lib/omniauth/strategies/microsoft_graph.rb +8 -0
- data/test/strategy_test.rb +14 -0
- data/test/test_helper.rb +1 -0
- 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: 7a4f9e6f30c9345bfecae177b729853723522de6
|
4
|
+
data.tar.gz: 24b6ab91c36c01a1e924881d5fb5c567458009ee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 353e5cd4d3547f753a2c99024648df2586c4f7d02a536e6394aa6bfe8a2ed21c294a379cec1702ac08780f0a5830b8ca0ee94076668bc37cee0bcc5986d8ee16
|
7
|
+
data.tar.gz: 795de6bad7822e1abab2709b966bb9b10ee8407c7ef9011fc0dad07627e4a9a652416d407b1b3579e2ee64eeac830bf1f65ddbceeedbc062a1524e087c81b52e
|
data/.travis.yml
CHANGED
@@ -53,6 +53,14 @@ module OmniAuth
|
|
53
53
|
def full_name
|
54
54
|
raw_info["displayName"].presence || raw_info.values_at("givenName", "surname").compact.join(' ')
|
55
55
|
end
|
56
|
+
|
57
|
+
def build_access_token
|
58
|
+
if request.params['access_token']
|
59
|
+
::OAuth2::AccessToken.from_hash(client, request.params.dup)
|
60
|
+
else
|
61
|
+
super
|
62
|
+
end
|
63
|
+
end
|
56
64
|
end
|
57
65
|
end
|
58
66
|
end
|
data/test/strategy_test.rb
CHANGED
@@ -10,3 +10,17 @@ class UidTest < StrategyTestCase
|
|
10
10
|
assert_equal '123', strategy.uid
|
11
11
|
end
|
12
12
|
end
|
13
|
+
|
14
|
+
class AccessTokenTest < StrategyTestCase
|
15
|
+
def setup
|
16
|
+
super
|
17
|
+
@request.stubs(:params).returns({ 'access_token' => 'valid_access_token' })
|
18
|
+
strategy.stubs(:client).returns(:client)
|
19
|
+
end
|
20
|
+
|
21
|
+
def test_build_access_token
|
22
|
+
token = strategy.build_access_token
|
23
|
+
assert_equal token.token, 'valid_access_token'
|
24
|
+
assert_equal token.client, :client
|
25
|
+
end
|
26
|
+
end
|
data/test/test_helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-microsoft_graph
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Philips
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-
|
12
|
+
date: 2018-10-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: omniauth-oauth2
|