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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cdecd030ef703f1a67b5ee1a0cb818c522e62caa
4
- data.tar.gz: fe2acbe7d3c926ebe96d1836f381d9861cd553e3
3
+ metadata.gz: 7a4f9e6f30c9345bfecae177b729853723522de6
4
+ data.tar.gz: 24b6ab91c36c01a1e924881d5fb5c567458009ee
5
5
  SHA512:
6
- metadata.gz: 1dbfaaa74ed47f1982ee67990dcaa422e8ab7c5ecd5e6f8f5209432b748ed922906a0458be0c554404f1b1dc37128c06493760ac5438b747f1587fd0559bc00d
7
- data.tar.gz: 0d754b53cc811ab543c6efc57776ee2ad0e471dbc57b194dc4fcc82c3c1a1c2aeab18e4df5c6e7a843a1807b7f3781e68c8f5bed4385a974abf80e6f8e02ef8a
6
+ metadata.gz: 353e5cd4d3547f753a2c99024648df2586c4f7d02a536e6394aa6bfe8a2ed21c294a379cec1702ac08780f0a5830b8ca0ee94076668bc37cee0bcc5986d8ee16
7
+ data.tar.gz: 795de6bad7822e1abab2709b966bb9b10ee8407c7ef9011fc0dad07627e4a9a652416d407b1b3579e2ee64eeac830bf1f65ddbceeedbc062a1524e087c81b52e
data/.travis.yml CHANGED
@@ -2,4 +2,3 @@ language: ruby
2
2
  rvm:
3
3
  - 2.2
4
4
  - jruby
5
- - rbx-2
@@ -1,5 +1,5 @@
1
1
  module Omniauth
2
2
  module MicrosoftGraph
3
- VERSION = "0.1.1"
3
+ VERSION = "0.2.0"
4
4
  end
5
5
  end
@@ -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
@@ -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
@@ -16,6 +16,7 @@ class StrategyTestCase < Minitest::Test
16
16
 
17
17
  @client_id = '123'
18
18
  @client_secret = '53cr3tz'
19
+ @options = {}
19
20
  end
20
21
 
21
22
  def strategy
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.1.1
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-08-02 00:00:00.000000000 Z
12
+ date: 2018-10-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: omniauth-oauth2