omniauth-infinum_azure 0.1.5 → 0.1.7

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: '0178441ee865dcc137189f779e7eae305e5ca5f870e040e427b9b999a41fbe9a'
4
- data.tar.gz: d15f11359e2add574be59594631397604b876bcffb411eba971be830af7b3ece
3
+ metadata.gz: 5f3293acb8cb3c28513fa2074257e56379aa9eb241eecde33fa46920fbad4459
4
+ data.tar.gz: f1b76ea5f410097d31de6a35235a070f130057b637d362a71faa298d6eda79a0
5
5
  SHA512:
6
- metadata.gz: cd379ff423fbf4f312c0839e5d83f96ab7be8f0b9b3c389e3623837062903f9bd2789b27af82b211ec722efe84cb38b5c5a4b4451246f5f0bfbfb99a484f1727
7
- data.tar.gz: d6f08b74f57bfe0061c6b2bdca4fc3c0d9b94a3b87b70933eba55254045a3b75f7d4368ff38215348d5d984d5aa6123f3db091b7dd65bf47e0f9bbde3266137b
6
+ metadata.gz: 8c83144243122e6b82c34bac96a4c11db2ec2e25638165bb3ec1b256c1ac660e5463f7c4e133e99e96d6d121ac348ce0b00e4bce40b3f65d00f174bb2c1fc68b
7
+ data.tar.gz: 4ecbe18123fb2e2fb2e079ec07e301f70ddde3ee6fa5b8d0ef57f167ca170a4d786ef71d8d0fa6339ea1010c89e27314ae82e30f8c3cb3ceb1a1a010b8bcbf95
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.1.7] - 2023-04-04
4
+
5
+ - Change policy ID to allow signin and signup
6
+
7
+ ## [0.1.6] - 2023-03-15
8
+
9
+ - Raise error if tenant not provided
10
+
3
11
  ## [0.1.5] - 2023-03-14
4
12
 
5
13
  - Read tenant from client options
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- omniauth-infinum_azure (0.1.5)
4
+ omniauth-infinum_azure (0.1.7)
5
5
  omniauth-oauth2
6
6
 
7
7
  GEM
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Omniauth
4
4
  module InfinumAzure
5
- VERSION = '0.1.5'
5
+ VERSION = '0.1.7'
6
6
  end
7
7
  end
@@ -4,17 +4,9 @@ module OmniAuth
4
4
  module Strategies
5
5
  class InfinumAzure < OmniAuth::Strategies::OAuth2
6
6
  option :name, 'infinum_azure'
7
- option :policy, 'B2C_1_sign_in'
7
+ option :policy, 'B2C_1A_SIGNUP_SIGNIN'
8
8
  option :scope, 'openid'
9
9
 
10
- def base_azure_url
11
- "https://#{tenant}.b2clogin.com/#{tenant}.onmicrosoft.com/#{options.policy}/oauth2/v2.0"
12
- end
13
-
14
- def tenant
15
- options.client_options.tenant || 'tenant_not_provided'
16
- end
17
-
18
10
  def client
19
11
  options.client_options.authorize_url = File.join(base_azure_url, 'authorize')
20
12
  options.client_options.token_url = File.join(base_azure_url, 'token')
@@ -22,8 +14,14 @@ module OmniAuth
22
14
  super
23
15
  end
24
16
 
25
- def logout_url
26
- File.join(base_azure_url, 'logout') + "?post_logout_redirect_uri=#{File.join(full_host, path_prefix, 'logout')}"
17
+ def base_azure_url
18
+ raise 'Tenant not provided' if tenant.nil?
19
+
20
+ "https://#{tenant}.b2clogin.com/#{tenant}.onmicrosoft.com/#{options.policy}/oauth2/v2.0"
21
+ end
22
+
23
+ def tenant
24
+ options.client_options.tenant
27
25
  end
28
26
 
29
27
  def other_phase
@@ -32,6 +30,10 @@ module OmniAuth
32
30
  redirect(logout_url)
33
31
  end
34
32
 
33
+ def logout_url
34
+ File.join(base_azure_url, 'logout') + "?post_logout_redirect_uri=#{File.join(full_host, path_prefix, 'logout')}"
35
+ end
36
+
35
37
  uid do
36
38
  raw_info['sub']
37
39
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-infinum_azure
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.7
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-03-14 00:00:00.000000000 Z
11
+ date: 2023-04-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler