omniauth-microsoft_graph 0.3.3 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
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
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 3b44d91f86e5b9e5ab57466bf82a98dd57d1f02739d2849e010fe4291be36598
|
4
|
+
data.tar.gz: 5007297df1581f6a1c530bb45f8d452cb00d7943fd06329131a7048eb48c3b0d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a7a505dcd6516579f58bd406b6bde6656eb49d143fd65e89255ea7170269d3bff235c9775f72a71a69266fa5515d34a8a1e5d87d5ac3c842e36a283683237bd1
|
7
|
+
data.tar.gz: 4202e44174712058a256319a7e856ea2efabc822ca8293c45ee7d994b6b5ba5ae09454a768c90b187d3c5ab1942a965af4a6a29beb789e063858c11e9fb9361a
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# This workflow uses actions that are not certified by GitHub.
|
2
|
+
# They are provided by a third-party and are governed by
|
3
|
+
# separate terms of service, privacy policy, and support
|
4
|
+
# documentation.
|
5
|
+
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
|
6
|
+
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
|
7
|
+
|
8
|
+
name: Ruby
|
9
|
+
|
10
|
+
on:
|
11
|
+
push:
|
12
|
+
branches: [ master ]
|
13
|
+
pull_request:
|
14
|
+
branches: [ master ]
|
15
|
+
|
16
|
+
jobs:
|
17
|
+
test:
|
18
|
+
|
19
|
+
runs-on: ubuntu-latest
|
20
|
+
strategy:
|
21
|
+
matrix:
|
22
|
+
ruby-version: ['2.6', '2.7', '3.0']
|
23
|
+
|
24
|
+
steps:
|
25
|
+
- uses: actions/checkout@v2
|
26
|
+
- name: Set up Ruby
|
27
|
+
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
|
28
|
+
# change this to (see https://github.com/ruby/setup-ruby#versioning):
|
29
|
+
# uses: ruby/setup-ruby@v1
|
30
|
+
uses: ruby/setup-ruby@473e4d8fe5dd94ee328fdfca9f8c9c7afc9dae5e
|
31
|
+
with:
|
32
|
+
ruby-version: ${{ matrix.ruby-version }}
|
33
|
+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
34
|
+
- name: Run tests
|
35
|
+
run: bundle exec rake
|
data/README.md
CHANGED
@@ -1,4 +1,5 @@
|
|
1
|
-
# Omniauth::MicrosoftGraph
|
1
|
+
# Omniauth::MicrosoftGraph ![ruby workflow](https://github.com/synth/omniauth-microsoft_graph/actions/workflows/ruby.yml/badge.svg)
|
2
|
+
|
2
3
|
|
3
4
|
Microsoft Graph OAuth2 Strategy for OmniAuth.
|
4
5
|
Can be used to authenticate with Office365 or other MS services, and get a token for the Microsoft Graph Api, formerly the Office365 Unified Api.
|
@@ -33,6 +34,8 @@ Just add {login_hint: "email@example.com"} to your url generation to form:
|
|
33
34
|
```ruby
|
34
35
|
/auth/microsoft_graph?login_hint=email@example.com
|
35
36
|
```
|
37
|
+
### Upgrading to 1.0.0
|
38
|
+
This version requires OmniAuth v2. If you are using Rails, you will need to include or upgrade `omniauth-rails_csrf_protection`. If you upgrade and get an error in your logs complaining about "authenticity error" or similiar, make sure to do `bundle update omniauth-rails_csrf_protection`
|
36
39
|
|
37
40
|
## Contributing
|
38
41
|
|
@@ -18,8 +18,8 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.add_runtime_dependency 'omniauth', '~>
|
22
|
-
spec.add_runtime_dependency 'omniauth-oauth2', '~> 1.
|
21
|
+
spec.add_runtime_dependency 'omniauth', '~> 2.0.4'
|
22
|
+
spec.add_runtime_dependency 'omniauth-oauth2', '~> 1.7.1'
|
23
23
|
spec.add_development_dependency "sinatra", '~> 0'
|
24
24
|
spec.add_development_dependency "rake", '~> 12.3.3', '>= 12.3.3'
|
25
25
|
spec.add_development_dependency 'rspec', '~> 3.6'
|
@@ -151,7 +151,7 @@ describe OmniAuth::Strategies::MicrosoftGraph do
|
|
151
151
|
end
|
152
152
|
|
153
153
|
it 'should set default scope to email,profile' do
|
154
|
-
expect(subject.authorize_params['scope']).to eq('openid email profile https://graph.microsoft.com/User.Read')
|
154
|
+
expect(subject.authorize_params['scope']).to eq('offline_access openid email profile https://graph.microsoft.com/User.Read')
|
155
155
|
end
|
156
156
|
|
157
157
|
it 'should support space delimited scopes' do
|
@@ -243,6 +243,7 @@ describe OmniAuth::Strategies::MicrosoftGraph do
|
|
243
243
|
|
244
244
|
describe '#callback_path' do
|
245
245
|
it 'has the correct default callback path' do
|
246
|
+
allow(subject).to receive(:script_name).and_return('')
|
246
247
|
expect(subject.callback_path).to eq('/auth/microsoft_graph/callback')
|
247
248
|
end
|
248
249
|
|
@@ -250,6 +251,11 @@ describe OmniAuth::Strategies::MicrosoftGraph do
|
|
250
251
|
@options = { callback_path: '/auth/foo/callback' }
|
251
252
|
expect(subject.callback_path).to eq('/auth/foo/callback')
|
252
253
|
end
|
254
|
+
|
255
|
+
it 'should set the callback_path with script_name if present' do
|
256
|
+
allow(subject).to receive(:script_name).and_return('/api/v1')
|
257
|
+
expect(subject.callback_path).to eq('/api/v1/auth/microsoft_graph/callback')
|
258
|
+
end
|
253
259
|
end
|
254
260
|
|
255
261
|
describe '#info' do
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-microsoft_graph
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Philips
|
8
8
|
- Joel Van Horn
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2021-10-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: omniauth
|
@@ -17,34 +17,28 @@ dependencies:
|
|
17
17
|
requirements:
|
18
18
|
- - "~>"
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version:
|
21
|
-
- - ">="
|
22
|
-
- !ruby/object:Gem::Version
|
23
|
-
version: 1.1.1
|
20
|
+
version: 2.0.4
|
24
21
|
type: :runtime
|
25
22
|
prerelease: false
|
26
23
|
version_requirements: !ruby/object:Gem::Requirement
|
27
24
|
requirements:
|
28
25
|
- - "~>"
|
29
26
|
- !ruby/object:Gem::Version
|
30
|
-
version:
|
31
|
-
- - ">="
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: 1.1.1
|
27
|
+
version: 2.0.4
|
34
28
|
- !ruby/object:Gem::Dependency
|
35
29
|
name: omniauth-oauth2
|
36
30
|
requirement: !ruby/object:Gem::Requirement
|
37
31
|
requirements:
|
38
32
|
- - "~>"
|
39
33
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
34
|
+
version: 1.7.1
|
41
35
|
type: :runtime
|
42
36
|
prerelease: false
|
43
37
|
version_requirements: !ruby/object:Gem::Requirement
|
44
38
|
requirements:
|
45
39
|
- - "~>"
|
46
40
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
41
|
+
version: 1.7.1
|
48
42
|
- !ruby/object:Gem::Dependency
|
49
43
|
name: sinatra
|
50
44
|
requirement: !ruby/object:Gem::Requirement
|
@@ -115,6 +109,7 @@ executables: []
|
|
115
109
|
extensions: []
|
116
110
|
extra_rdoc_files: []
|
117
111
|
files:
|
112
|
+
- ".github/workflows/ruby.yml"
|
118
113
|
- ".travis.yml"
|
119
114
|
- CHANGELOG.md
|
120
115
|
- Gemfile
|
@@ -133,7 +128,7 @@ homepage: https://github.com/synth/omniauth-microsoft_graph
|
|
133
128
|
licenses:
|
134
129
|
- MIT
|
135
130
|
metadata: {}
|
136
|
-
post_install_message:
|
131
|
+
post_install_message:
|
137
132
|
rdoc_options: []
|
138
133
|
require_paths:
|
139
134
|
- lib
|
@@ -148,9 +143,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
148
143
|
- !ruby/object:Gem::Version
|
149
144
|
version: '0'
|
150
145
|
requirements: []
|
151
|
-
|
152
|
-
|
153
|
-
signing_key:
|
146
|
+
rubygems_version: 3.1.4
|
147
|
+
signing_key:
|
154
148
|
specification_version: 4
|
155
149
|
summary: omniauth provider for Microsoft Graph
|
156
150
|
test_files:
|