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: 7b32fc31d6fa788f4166c98f65797ab00737474a53262884b5879452147b551c
4
- data.tar.gz: 2c9c5ad54527fd2ce2617769f4fd12198b5303547738e13c2bc95037f66558b7
3
+ metadata.gz: c0c1bfe091abf9d5665b78751dd404b2c51dc418fcfce11d626567a442c145cb
4
+ data.tar.gz: f67b8fdbd80fe99d2358e5e75d600602b00574f52cbae6c4aed679ae2a141a81
5
5
  SHA512:
6
- metadata.gz: b1d779f06e9c29d9c6d64575c90fd25ab6d27c0eaaed86067f89b623139ad6e90a785e7f55ec61f083747d863f9dc2ac90e300ce91b2d75bce40f9e4d676deb5
7
- data.tar.gz: 2fdb8a81820f9d3d791af728bd726e6db56722cc30da565e91c9f6854e6135f710ff8dc52e1789002018c9ad7e86feadd4804948fd7066ebde33e7c4169d312b
6
+ metadata.gz: 82bb397f7041ba03c5eb90a31871f3368282a8e1890db752245560698e0590cdc1810b5b70ea6d1b35b8187c2477b9b837fe6da62e62c24215300bb44063b65a
7
+ data.tar.gz: ff401a1e3ce9844084ad3c292c08d651ab787c6706b856630496f9f89a0ebe682ac7efa532c575ba283e2a4252d87d39c257a949da9ff830bdd6d1b22908f003
data/CHANGELOG.md CHANGED
@@ -1,8 +1,10 @@
1
1
  ## [Unreleased]
2
2
 
3
- ## [0.4.3] - 2023-07-10
3
+ ## [1.0.0] - 2023-06-20
4
4
 
5
- - Fix bug: Use pluralized resource_name for generating the logout paths
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
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- infinum_azure (0.4.3)
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
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 "/#{InfinumAzure.resource_name.pluralize.underscore}/auth/infinum_azure/logout",
5
- to: 'infinum_azure/resources#passthru',
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'
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module InfinumAzure
4
- VERSION = '0.4.3'
4
+ VERSION = '1.0.0'
5
5
  end
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.3
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-07-10 00:00:00.000000000 Z
11
+ date: 2023-06-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler