omniauth-azure-activedirectory-v2 2.2.0 → 2.3.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/README.md +1 -0
- data/lib/omniauth/azure_activedirectory_v2/version.rb +2 -2
- data/lib/omniauth/strategies/azure_activedirectory_v2.rb +4 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1d2af307cd27da676b6c99c2898110b3f25756512b8c0deb86c61f2b5885f4f2
|
4
|
+
data.tar.gz: 51d51b4c4c6a607d2556bb4e22fade57d07686bffd363d92898dfed39e148b14
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f111440b945136d382f51cd17cff17ef899a898e2dde86e15bb913fd21a3be33863387b9c9f95e659ac670c19524fc4e5fde9972ce0fdf60bb24cc5a85007a1c
|
7
|
+
data.tar.gz: 3ab5ed6e3e8d6f20e660f00976b4e1cffeeee2c57eee0a8880d40b1143490e7dbd6b8c6feb83491f1161127a402c9fe121c47c48ed380527beda51acdc3f43df
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
## v2.3.0 (2024-07-16)
|
4
|
+
|
5
|
+
[Implements](https://github.com/RIPAGlobal/omniauth-azure-activedirectory-v2/pull/29) support for on-premise Active Directory installations via the `adfs` option; see `README.md` for details - thanks @frenkel!
|
6
|
+
|
3
7
|
## v2.2.0 (2024-07-09)
|
4
8
|
|
5
9
|
[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!
|
data/README.md
CHANGED
@@ -106,6 +106,7 @@ All of the items listed below are optional, unless noted otherwise. They can be
|
|
106
106
|
| `authorize_params` | Additional parameters passed as URL query data in the initial OAuth redirection to Microsoft. See below for more. Empty Hash default. |
|
107
107
|
| `domain_hint` | If defined, sets (overwriting, if already present) `domain_hint` inside `authorize_params`. Default `nil` / none. |
|
108
108
|
| `scope` | If defined, sets (overwriting, if already present) `scope` inside `authorize_params`. Default is `OmniAuth::Strategies::AzureActivedirectoryV2::DEFAULT_SCOPE` (at the time of writing, this is `'openid profile email'`). |
|
109
|
+
| `adfs` | If defined, modifies the URLs so they work with an on premise ADFS server. In order to use this you also need to set the `base_azure_url` correctly and fill the `tenant_id` with `'adfs'`. |
|
109
110
|
|
110
111
|
In addition, as a special case, if the request URL contains a query parameter `prompt`, then this will be written into `authorize_params` under that key, overwriting if present any other value there. Note that this comes from the current request URL at the time OAuth flow is commencing, _not_ via static options Hash data or via a custom provider class - but you _could_ just as easily set `scope` inside a custom `authorize_params` returned from a provider class, as shown in an example later; the request URL query mechanism is just another way of doing the same thing.
|
111
112
|
|
@@ -52,12 +52,13 @@ module OmniAuth
|
|
52
52
|
options.custom_policy =
|
53
53
|
provider.respond_to?(:custom_policy) ? provider.custom_policy : nil
|
54
54
|
|
55
|
-
|
55
|
+
oauth2 = provider.respond_to?(:adfs?) && provider.adfs? ? 'oauth2' : 'oauth2/v2.0'
|
56
|
+
options.client_options.authorize_url = "#{options.base_azure_url}/#{options.tenant_id}/#{oauth2}/authorize"
|
56
57
|
options.client_options.token_url =
|
57
58
|
if options.custom_policy
|
58
|
-
"#{options.base_azure_url}/#{options.tenant_id}/#{options.custom_policy}
|
59
|
+
"#{options.base_azure_url}/#{options.tenant_id}/#{options.custom_policy}/#{oauth2}/token"
|
59
60
|
else
|
60
|
-
"#{options.base_azure_url}/#{options.tenant_id}
|
61
|
+
"#{options.base_azure_url}/#{options.tenant_id}/#{oauth2}/token"
|
61
62
|
end
|
62
63
|
|
63
64
|
super
|
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.3.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: 2024-07-
|
11
|
+
date: 2024-07-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: omniauth-oauth2
|