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 +4 -4
- data/CHANGELOG.md +9 -0
- data/Gemfile.lock +1 -1
- data/app/controllers/infinum_azure/resources/omniauth_callbacks_controller.rb +1 -1
- data/app/services/infinum_azure/resources/finder.rb +0 -7
- data/lib/infinum_azure/defaults.rb +1 -1
- data/lib/infinum_azure/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c0c1bfe091abf9d5665b78751dd404b2c51dc418fcfce11d626567a442c145cb
|
4
|
+
data.tar.gz: f67b8fdbd80fe99d2358e5e75d600602b00574f52cbae6c4aed679ae2a141a81
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
@@ -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.
|
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,
|
15
|
+
record.update_attribute(:provider, 'infinum_azure')
|
16
16
|
record.update_attribute(:uid, resource['uid'])
|
17
17
|
}
|
18
18
|
}.freeze
|