infinum_azure 0.4.3 → 1.1.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bccb0f25aa72b0098db31e9ab4506056dba8612b377ff357fccad37c06d4fa61
|
4
|
+
data.tar.gz: 78712899ea5cf67f4873a57ab3131fdf63f631a0b28df303801833df590721df
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f89d14ae10ecc4b56db75c44fcf39d7bf16676c3e545c5a6630bb0b7346117bbb7e04335cbc0f5caae02051848c5709fa3de5fedb805c2d3cc15a04ce6782c55
|
7
|
+
data.tar.gz: a5f247dd19493b8961f49499f971ceaebe6f3e2a79f42648a06158e4e2db3b39b40b0c2fc5c2844f09f23a4004f79c18fd76cda2baaf4ef6b7f205f1343da86c
|
data/CHANGELOG.md
CHANGED
@@ -1,9 +1,15 @@
|
|
1
1
|
## [Unreleased]
|
2
2
|
|
3
|
-
## [
|
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
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 =
|
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.
|
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
|