infinum_azure 1.0.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c0c1bfe091abf9d5665b78751dd404b2c51dc418fcfce11d626567a442c145cb
4
- data.tar.gz: f67b8fdbd80fe99d2358e5e75d600602b00574f52cbae6c4aed679ae2a141a81
3
+ metadata.gz: ed06b297d0b3f0e23fb9f1907a47d0929a0877d18118a2b1cc082ab1ff590151
4
+ data.tar.gz: a50b124bb33df07057eb8d9d2460cfa46373b2187a3272b3714670f8ded8df2b
5
5
  SHA512:
6
- metadata.gz: 82bb397f7041ba03c5eb90a31871f3368282a8e1890db752245560698e0590cdc1810b5b70ea6d1b35b8187c2477b9b837fe6da62e62c24215300bb44063b65a
7
- data.tar.gz: ff401a1e3ce9844084ad3c292c08d651ab787c6706b856630496f9f89a0ebe682ac7efa532c575ba283e2a4252d87d39c257a949da9ff830bdd6d1b22908f003
6
+ metadata.gz: e1d8a9312d942c4460926640c6b94ba95fd51a481cac78c176fea9f1a7462e55dbb1aeb38e92d2b42fe110ea776feda207efaa652d644412130d0cd4751a476c
7
+ data.tar.gz: f7b751e569c6100128fb23dba031a9fcb37354d1d4471fed008edb7f3d7fe6e7a9cb3a52a0e121ba71efff7be29b8ef803fc3450a365d1e8e875c8cfea867203
data/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [2.0.0] - 2024-03-12
4
+
5
+ **BREAKING CHANGE**
6
+ - Add `domain` client option - versions that use the transient dependency `omniauth-infinum_azure` prior to version 1 will not break, but are deprecated and will raise errors in version 2
7
+
8
+ ## [1.1.0] - 2023-07-10
9
+
10
+ - Fix bug: Use pluralized resource_name for generating the logout paths
11
+
3
12
  ## [1.0.0] - 2023-06-20
4
13
 
5
14
  #### Breaking change
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- infinum_azure (1.0.0)
4
+ infinum_azure (2.0.0)
5
5
  bundler
6
6
  devise
7
7
  omniauth-infinum_azure (>= 0.3.0, < 2.0)
@@ -148,7 +148,7 @@ GEM
148
148
  hashie (>= 3.4.6)
149
149
  rack (>= 2.2.3)
150
150
  rack-protection
151
- omniauth-infinum_azure (0.3.0)
151
+ omniauth-infinum_azure (1.0.0)
152
152
  omniauth-oauth2
153
153
  omniauth-oauth2 (1.8.0)
154
154
  oauth2 (>= 1.4, < 3)
@@ -250,6 +250,7 @@ GEM
250
250
 
251
251
  PLATFORMS
252
252
  arm64-darwin-21
253
+ arm64-darwin-22
253
254
 
254
255
  DEPENDENCIES
255
256
  bundler
data/README.md CHANGED
@@ -45,7 +45,7 @@ InfinumAzure.configure do |config|
45
45
  :deactivated_at, :provider_groups, :employee]
46
46
 
47
47
  config.user_migration_scope = -> { resource_class.where(provider: 'infinum_id') }
48
- config.user_migration_operation = > (record, resource) {
48
+ config.user_migration_operation = -> (record, resource) {
49
49
  record.update_attribute(:provider, 'infinum_azure')
50
50
  record.update_attribute(:uid, resource['uid'])
51
51
  }
@@ -78,6 +78,7 @@ Required ones are:
78
78
  infinum_azure:
79
79
  client_id: 'client_id_from_InfinumAzure'
80
80
  client_secret: 'client_secret_from_InfinumAzure'
81
+ domain: 'https://login.b2c.com'
81
82
  tenant: 'InfinumAzure_tenant'
82
83
  ```
83
84
 
@@ -18,5 +18,8 @@ Devise.setup do |config|
18
18
 
19
19
  # ==> OmniAuth
20
20
  config.omniauth :infinum_azure, InfinumAzure.client_id, InfinumAzure.client_secret,
21
- client_options: { tenant: InfinumAzure.tenant }
21
+ client_options: {
22
+ domain: InfinumAzure.domain,
23
+ tenant: InfinumAzure.tenant
24
+ }
22
25
  end
data/config/routes.rb CHANGED
@@ -1,8 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  Rails.application.routes.draw do
4
- get '/users/auth/infinum_azure/logout', to: 'infinum_azure/resources#passthru', as: :infinum_azure_logout
5
- get '/users/auth/logout', to: 'infinum_azure/resources#destroy', as: :logout
4
+ get "/#{InfinumAzure.resource_name.pluralize.underscore}/auth/infinum_azure/logout",
5
+ to: 'infinum_azure/resources#passthru',
6
+ as: :infinum_azure_logout
7
+ get "/#{InfinumAzure.resource_name.pluralize.underscore}/auth/logout",
8
+ to: 'infinum_azure/resources#destroy',
9
+ as: :logout
6
10
 
7
11
  devise_for InfinumAzure.resource_name.pluralize.underscore, controllers: {
8
12
  omniauth_callbacks: 'infinum_azure/resources/omniauth_callbacks'
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module InfinumAzure
4
- VERSION = '1.0.0'
4
+ VERSION = '2.0.0'
5
5
  end
data/lib/infinum_azure.rb CHANGED
@@ -45,6 +45,10 @@ module InfinumAzure
45
45
  dig_secret(:client_secret)
46
46
  end
47
47
 
48
+ def domain
49
+ dig_secret(:domain)
50
+ end
51
+
48
52
  def tenant
49
53
  dig_secret(:tenant)
50
54
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: infinum_azure
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marko Ćilimković
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-06-20 00:00:00.000000000 Z
11
+ date: 2024-03-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -300,7 +300,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
300
300
  - !ruby/object:Gem::Version
301
301
  version: '0'
302
302
  requirements: []
303
- rubygems_version: 3.3.7
303
+ rubygems_version: 3.4.17
304
304
  signing_key:
305
305
  specification_version: 4
306
306
  summary: Authentication mechanism for Rails apps with devise via OAuth2