infinum_azure 0.4.1 → 1.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: 5e6ef8a6759902572c7ae4efc622d8a247e8de06c4b548701d442c56205e05dd
4
- data.tar.gz: 6c604091662f4a0eaff0b37c40b877d53560843a2d54dbe997d89806800a27a7
3
+ metadata.gz: c0c1bfe091abf9d5665b78751dd404b2c51dc418fcfce11d626567a442c145cb
4
+ data.tar.gz: f67b8fdbd80fe99d2358e5e75d600602b00574f52cbae6c4aed679ae2a141a81
5
5
  SHA512:
6
- metadata.gz: 4852e62d5d9aa209d2d58c02b5a1630b3e676f71937646a014dd24d4b5e197e1d0d59ea745ac94fe7e7859495f234edd4e80d984556d61806ecd0c9fba3585bc
7
- data.tar.gz: a7445b7cf3ede9e7914d6b77aacba2e0c8879cd56b84408ba1269ba8cda667c77624431bbcb9f0dbdf112d7f0388d733094b6ce71947dda00f296dbe625acc4c
6
+ metadata.gz: 82bb397f7041ba03c5eb90a31871f3368282a8e1890db752245560698e0590cdc1810b5b70ea6d1b35b8187c2477b9b837fe6da62e62c24215300bb44063b65a
7
+ data.tar.gz: ff401a1e3ce9844084ad3c292c08d651ab787c6706b856630496f9f89a0ebe682ac7efa532c575ba283e2a4252d87d39c257a949da9ff830bdd6d1b22908f003
data/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [1.0.0] - 2023-06-20
4
+
5
+ #### Breaking change
6
+
7
+ 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".
8
+
9
+ ## [0.4.2] - 2023-06-20
10
+
11
+ - Fix bug: Always set `provider` to "infinum_azure" in default #user_migration_operation
3
12
  ## [0.4.1] - 2023-06-20
4
13
 
5
14
  - Remove `Value` JSON wrapper from Azure Users API response
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- infinum_azure (0.4.1)
4
+ infinum_azure (1.0.0)
5
5
  bundler
6
6
  devise
7
7
  omniauth-infinum_azure (>= 0.3.0, < 2.0)
@@ -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
@@ -12,7 +12,7 @@ module InfinumAzure
12
12
  ],
13
13
  user_migration_scope: -> { InfinumAzure.resource_class.where(provider: 'infinum_id') },
14
14
  user_migration_operation: ->(record, resource) {
15
- record.update_attribute(:provider, provider)
15
+ record.update_attribute(:provider, 'infinum_azure')
16
16
  record.update_attribute(:uid, resource['uid'])
17
17
  }
18
18
  }.freeze
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module InfinumAzure
4
- VERSION = '0.4.1'
4
+ VERSION = '1.0.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.1
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marko Ćilimković