infinum_azure 0.4.3 → 1.1.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: 7b32fc31d6fa788f4166c98f65797ab00737474a53262884b5879452147b551c
4
- data.tar.gz: 2c9c5ad54527fd2ce2617769f4fd12198b5303547738e13c2bc95037f66558b7
3
+ metadata.gz: bccb0f25aa72b0098db31e9ab4506056dba8612b377ff357fccad37c06d4fa61
4
+ data.tar.gz: 78712899ea5cf67f4873a57ab3131fdf63f631a0b28df303801833df590721df
5
5
  SHA512:
6
- metadata.gz: b1d779f06e9c29d9c6d64575c90fd25ab6d27c0eaaed86067f89b623139ad6e90a785e7f55ec61f083747d863f9dc2ac90e300ce91b2d75bce40f9e4d676deb5
7
- data.tar.gz: 2fdb8a81820f9d3d791af728bd726e6db56722cc30da565e91c9f6854e6135f710ff8dc52e1789002018c9ad7e86feadd4804948fd7066ebde33e7c4169d312b
6
+ metadata.gz: f89d14ae10ecc4b56db75c44fcf39d7bf16676c3e545c5a6630bb0b7346117bbb7e04335cbc0f5caae02051848c5709fa3de5fedb805c2d3cc15a04ce6782c55
7
+ data.tar.gz: a5f247dd19493b8961f49499f971ceaebe6f3e2a79f42648a06158e4e2db3b39b40b0c2fc5c2844f09f23a4004f79c18fd76cda2baaf4ef6b7f205f1343da86c
data/CHANGELOG.md CHANGED
@@ -1,9 +1,15 @@
1
1
  ## [Unreleased]
2
2
 
3
- ## [0.4.3] - 2023-07-10
3
+ ## [1.1.0] - 2023-07-10
4
4
 
5
5
  - Fix bug: Use pluralized resource_name for generating the logout paths
6
6
 
7
+ ## [1.0.0] - 2023-06-20
8
+
9
+ #### Breaking change
10
+
11
+ This change switches from using the `email` as a match for finding which user logged in to `uid` and `provider`. Before you move to 1.0.0 usage, you need to ensure your user data has been migrated to Infinum Azure. Ensure all `uid` values are updated and `provider` is set to "infinum_azure".
12
+
7
13
  ## [0.4.2] - 2023-06-20
8
14
 
9
15
  - Fix bug: Always set `provider` to "infinum_azure" in default #user_migration_operation
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- infinum_azure (0.4.3)
4
+ infinum_azure (1.1.0)
5
5
  bundler
6
6
  devise
7
7
  omniauth-infinum_azure (>= 0.3.0, < 2.0)
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
  }
@@ -4,7 +4,7 @@ module InfinumAzure
4
4
  module Resources
5
5
  class OmniauthCallbacksController < Devise::OmniauthCallbacksController
6
6
  def infinum_azure
7
- resource = InfinumAzure::Resources::Finder.from_omniauth_by_email(omniauth['info']['email'])
7
+ resource = InfinumAzure::Resources::Finder.from_omniauth(omniauth)
8
8
 
9
9
  if resource
10
10
  flash[:notice] = I18n.t 'devise.omniauth_callbacks.success', kind: 'Azure'
@@ -6,13 +6,6 @@ module InfinumAzure
6
6
  def self.from_omniauth(auth)
7
7
  InfinumAzure.resource_class.find_by(provider: auth.provider, uid: auth.uid)
8
8
  end
9
-
10
- # this is a temporary method which won't be used in subsequent versions
11
- # the user data first has to be migrated (update provider to azure and uid from B2C)
12
- # in the meantime, we'll use a lowercased email as a unique identifier
13
- def self.from_omniauth_by_email(email)
14
- InfinumAzure.resource_class.find_for_authentication(email: email)
15
- end
16
9
  end
17
10
  end
18
11
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module InfinumAzure
4
- VERSION = '0.4.3'
4
+ VERSION = '1.1.0'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: infinum_azure
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marko Ćilimković