omniauth-azure-activedirectory-v2 2.2.0 → 2.4.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4d83e537b36b58ba370dad64ad70f74eed7d9c46e040bc22e2bd4881618d41fd
4
- data.tar.gz: 2b0f73ad03dbb4d1603994f015639532547742ed8f99aa02bbb69f3b4383058a
3
+ metadata.gz: 7a1efbd4534df6b079619c32ade6026e481a868259f160ce0b09e8bafd33dccd
4
+ data.tar.gz: 96b3f6eed0cd1dc8f5cbe08f51b2dfbdbbc9eb47b227bd2074967c0e9e1c82a1
5
5
  SHA512:
6
- metadata.gz: 7311d8d6538068f6181f1ac78a24ed315b96343a263aa0137d1a7ca31cd15b3f161664030c1966d8abfee40717924640d3ac2bd9534fbca8322844479c2c2339
7
- data.tar.gz: 4913177aa072ac5c04d74a3e121bf04ceb668c0ae53ebc0938849a265c7f6f4e6d12a23085273d4230fb82d8a2f237d889488970792056dc37ad255bb71978f8
6
+ metadata.gz: c22b19d6fba235dfef2602ba88415a2de4c3eea87d7d45a047eaed45bb3a1e7fd8b6040832ad08032435763073d7a501912e44486c2da84ff0d625b6280ebfed
7
+ data.tar.gz: dd11baab6770b910c51a1e051d87a132eaecb9a499eae026dc122f80945432e547cf72e880cbb14fb346b7dee1b87330098f685c1f8429937e3518e93b54541b
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Change Log
2
2
 
3
+ ## v2.4.0 (2024-10-17)
4
+
5
+ Deprecation warnings for end-of-life of the gem under this name. No other changes. The GitHub repository is to be renamed and the gem released (starting at major version 3) as `omniauth-entra-id`, with some breaking changes but details of how to update will be provided in the new gem via an `UPGRADING.md` document.
6
+
7
+ ## v2.3.0 (2024-07-16)
8
+
9
+ [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!
10
+
3
11
  ## v2.2.0 (2024-07-09)
4
12
 
5
13
  [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
@@ -4,6 +4,8 @@
4
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
5
  [![License](https://img.shields.io/github/license/RIPAGlobal/omniauth-azure-activedirectory-v2.svg)](LICENSE.txt)
6
6
 
7
+ **IMPORTANT: V2 is end-of-life** and superseded by a renamed gem, since Microsoft in their "wisdom" renamed Azure AD to Entra ID. A gem using the old name will become increasingly hard for people to 'discover'. The major version bump provides an opportunity to fix a few things via breaking changes, too. Please switch to `omniauth-entra-id`.
8
+
7
9
  OAuth 2 authentication with [Azure ActiveDirectory's V2 API](https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-overview). Rationale:
8
10
 
9
11
  * https://github.com/marknadig/omniauth-azure-oauth2 is no longer maintained.
@@ -106,6 +108,7 @@ All of the items listed below are optional, unless noted otherwise. They can be
106
108
  | `authorize_params` | Additional parameters passed as URL query data in the initial OAuth redirection to Microsoft. See below for more. Empty Hash default. |
107
109
  | `domain_hint` | If defined, sets (overwriting, if already present) `domain_hint` inside `authorize_params`. Default `nil` / none. |
108
110
  | `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'`). |
111
+ | `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
112
 
110
113
  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
114
 
@@ -2,8 +2,8 @@ module OmniAuth
2
2
  module Azure
3
3
  module Activedirectory
4
4
  module V2
5
- VERSION = "2.2.0"
6
- DATE = "2024-07-09"
5
+ VERSION = "2.4.0"
6
+ DATE = "2024-10-17"
7
7
  end
8
8
  end
9
9
  end
@@ -1,2 +1,4 @@
1
+ warn "[DEPRECATION] This gem has been renamed to 'omniauth-entra-id' and will no longer be supported. Please switch to 'omniauth-entra-id' as soon as possible."
2
+
1
3
  require File.join('omniauth', 'azure_activedirectory_v2', 'version')
2
4
  require File.join('omniauth', 'strategies', 'azure_activedirectory_v2')
@@ -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
- options.client_options.authorize_url = "#{options.base_azure_url}/#{options.tenant_id}/oauth2/v2.0/authorize"
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}/oauth2/v2.0/token"
59
+ "#{options.base_azure_url}/#{options.tenant_id}/#{options.custom_policy}/#{oauth2}/token"
59
60
  else
60
- "#{options.base_azure_url}/#{options.tenant_id}/oauth2/v2.0/token"
61
+ "#{options.base_azure_url}/#{options.tenant_id}/#{oauth2}/token"
61
62
  end
62
63
 
63
64
  super
@@ -8,6 +8,14 @@ require 'omniauth/azure_activedirectory_v2/version'
8
8
  # https://guides.rubygems.org/specification-reference/
9
9
  #
10
10
  Gem::Specification.new do |s|
11
+ s.post_install_message = <<-MESSAGE
12
+ ! The 'omniauth-azure-activedirectory-v2' gem has been deprecated and is
13
+ ! replaced by 'omniauth-entra-id'.
14
+ !
15
+ ! See: https://rubygems.org/gems/omniauth-entra-id
16
+ ! And: https://github.com/RIPAGlobal/omniauth-entra-id
17
+ MESSAGE
18
+
11
19
  s.name = 'omniauth-azure-activedirectory-v2'
12
20
  s.version = OmniAuth::Azure::Activedirectory::V2::VERSION
13
21
  s.date = OmniAuth::Azure::Activedirectory::V2::DATE
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.2.0
4
+ version: 2.4.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-09 00:00:00.000000000 Z
11
+ date: 2024-10-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth-oauth2
@@ -79,7 +79,12 @@ metadata:
79
79
  bug_tracker_uri: https://github.com/RIPAGlobal/omniauth-azure-activedirectory-v2/issues/
80
80
  changelog_uri: https://github.com/RIPAGlobal/omniauth-azure-activedirectory-v2/blob/master/CHANGELOG.md
81
81
  source_code_uri: https://github.com/RIPAGlobal/omniauth-azure-activedirectory-v2
82
- post_install_message:
82
+ post_install_message: |2
83
+ ! The 'omniauth-azure-activedirectory-v2' gem has been deprecated and is
84
+ ! replaced by 'omniauth-entra-id'.
85
+ !
86
+ ! See: https://rubygems.org/gems/omniauth-entra-id
87
+ ! And: https://github.com/RIPAGlobal/omniauth-entra-id
83
88
  rdoc_options: []
84
89
  require_paths:
85
90
  - lib
@@ -94,7 +99,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
94
99
  - !ruby/object:Gem::Version
95
100
  version: '0'
96
101
  requirements: []
97
- rubygems_version: 3.5.11
102
+ rubygems_version: 3.5.21
98
103
  signing_key:
99
104
  specification_version: 4
100
105
  summary: OAuth 2 authentication with the Azure ActiveDirectory V2 API.