infinum_azure 0.4.3 → 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:
|
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,8 +1,10 @@
|
|
1
1
|
## [Unreleased]
|
2
2
|
|
3
|
-
## [0.
|
3
|
+
## [1.0.0] - 2023-06-20
|
4
4
|
|
5
|
-
|
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".
|
6
8
|
|
7
9
|
## [0.4.2] - 2023-06-20
|
8
10
|
|
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
|
data/config/routes.rb
CHANGED
@@ -1,12 +1,8 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
Rails.application.routes.draw do
|
4
|
-
get
|
5
|
-
|
6
|
-
as: :infinum_azure_logout
|
7
|
-
get "/#{InfinumAzure.resource_name.pluralize.underscore}/auth/logout",
|
8
|
-
to: 'infinum_azure/resources#destroy',
|
9
|
-
as: :logout
|
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
|
10
6
|
|
11
7
|
devise_for InfinumAzure.resource_name.pluralize.underscore, controllers: {
|
12
8
|
omniauth_callbacks: 'infinum_azure/resources/omniauth_callbacks'
|
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: 0.
|
4
|
+
version: 1.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-
|
11
|
+
date: 2023-06-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|