omniauth-azure-activedirectory-v2 2.1.0 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile +1 -3
- data/README.md +19 -6
- data/lib/omniauth/azure_activedirectory_v2/version.rb +2 -2
- data/lib/omniauth/strategies/azure_activedirectory_v2.rb +3 -1
- data/omniauth-azure-activedirectory-v2.gemspec +3 -0
- metadata +31 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4d83e537b36b58ba370dad64ad70f74eed7d9c46e040bc22e2bd4881618d41fd
|
4
|
+
data.tar.gz: 2b0f73ad03dbb4d1603994f015639532547742ed8f99aa02bbb69f3b4383058a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7311d8d6538068f6181f1ac78a24ed315b96343a263aa0137d1a7ca31cd15b3f161664030c1966d8abfee40717924640d3ac2bd9534fbca8322844479c2c2339
|
7
|
+
data.tar.gz: 4913177aa072ac5c04d74a3e121bf04ceb668c0ae53ebc0938849a265c7f6f4e6d12a23085273d4230fb82d8a2f237d889488970792056dc37ad255bb71978f8
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
## v2.2.0 (2024-07-09)
|
4
|
+
|
5
|
+
[Implements](https://github.com/RIPAGlobal/omniauth-azure-activedirectory-v2/pull/26) support for specifying `scope` via the authorisation URL, in addition to the prior support for static configuration or configuration via a custom provider class - thanks @nbgoodall!
|
6
|
+
|
3
7
|
## v2.1.0 (2023-09-16)
|
4
8
|
|
5
9
|
[Implements](https://github.com/RIPAGlobal/omniauth-azure-activedirectory-v2/pull/19) support for custom policies when using Microsoft Azure AD - thanks @stevenchanin!
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# OmniAuth::Azure::Activedirectory::V2
|
2
2
|
|
3
|
-
[![Gem Version](https://badge.fury.io/rb/omniauth-azure-activedirectory-v2.svg)](https://
|
4
|
-
[![Build Status](https://
|
5
|
-
[![License](https://img.shields.io/github/license/RIPAGlobal/omniauth-azure-activedirectory-v2.svg)](LICENSE.
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/omniauth-azure-activedirectory-v2.svg)](https://rubygems.org/gems/omniauth-azure-activedirectory-v2)
|
4
|
+
[![Build Status](https://github.com/RIPAGlobal/omniauth-azure-activedirectory-v2/actions/workflows/master.yml/badge.svg)](https://github.com/RIPAGlobal/omniauth-azure-activedirectory-v2/actions)
|
5
|
+
[![License](https://img.shields.io/github/license/RIPAGlobal/omniauth-azure-activedirectory-v2.svg)](LICENSE.txt)
|
6
6
|
|
7
7
|
OAuth 2 authentication with [Azure ActiveDirectory's V2 API](https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-overview). Rationale:
|
8
8
|
|
@@ -25,12 +25,15 @@ gem 'omniauth-azure-activedirectory-v2'
|
|
25
25
|
|
26
26
|
And then execute:
|
27
27
|
|
28
|
-
|
28
|
+
```shell
|
29
|
+
$ bundle install
|
30
|
+
```
|
29
31
|
|
30
32
|
Or install it yourself as:
|
31
33
|
|
32
|
-
|
33
|
-
|
34
|
+
```shell
|
35
|
+
$ gem install omniauth-azure-activedirectory-v2
|
36
|
+
```
|
34
37
|
|
35
38
|
|
36
39
|
## Usage
|
@@ -162,6 +165,14 @@ In method `#authorize_params` above, the request object is used to look for a `l
|
|
162
165
|
|
163
166
|
> **NB:** Naming things is hard! The predecessor gem used the name `YouTenantProvider` since it was focused on custom tenant provision, but if using this in a more generic way, perhaps consider a more generic name such as, say, `CustomOmniAuthAzureProvider`.
|
164
167
|
|
168
|
+
#### Special case scope override
|
169
|
+
|
170
|
+
If required and more convenient, you can specify a custom `scope` value via generation of an authorisation URL including that required `scope`, rather than by using a custom provider class with `def scope...end` method. Include the `scope` value in your call to generate the URL thus:
|
171
|
+
|
172
|
+
```ruby
|
173
|
+
omniauth_authorize_url('resource_name_eg_user', 'azure_activedirectory_v2', scope: '...')
|
174
|
+
```
|
175
|
+
|
165
176
|
|
166
177
|
|
167
178
|
## Contributing
|
@@ -182,6 +193,8 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/RIPAGl
|
|
182
193
|
* Add tests and check that `bundle exec rspec` still runs successfully
|
183
194
|
* For new features (rather than bug fixes), update `README.md` with details
|
184
195
|
|
196
|
+
|
197
|
+
|
185
198
|
## License
|
186
199
|
|
187
200
|
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
@@ -41,7 +41,9 @@ module OmniAuth
|
|
41
41
|
options.authorize_params.prompt = request.params['prompt']
|
42
42
|
end
|
43
43
|
|
44
|
-
options.authorize_params.scope = if
|
44
|
+
options.authorize_params.scope = if defined?(request) && request.params['scope']
|
45
|
+
request.params['scope']
|
46
|
+
elsif provider.respond_to?(:scope) && provider.scope
|
45
47
|
provider.scope
|
46
48
|
else
|
47
49
|
DEFAULT_SCOPE
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-azure-activedirectory-v2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- RIPA Global
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-07-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: omniauth-oauth2
|
@@ -24,6 +24,34 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.8'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '13.2'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '13.2'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3.13'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3.13'
|
27
55
|
description:
|
28
56
|
email:
|
29
57
|
- dev@ripaglobal.com
|
@@ -66,7 +94,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
66
94
|
- !ruby/object:Gem::Version
|
67
95
|
version: '0'
|
68
96
|
requirements: []
|
69
|
-
rubygems_version: 3.
|
97
|
+
rubygems_version: 3.5.11
|
70
98
|
signing_key:
|
71
99
|
specification_version: 4
|
72
100
|
summary: OAuth 2 authentication with the Azure ActiveDirectory V2 API.
|