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 +4 -4
- data/CHANGELOG.md +8 -0
- data/Gemfile.lock +1 -1
- data/lib/omniauth/infinum_azure/version.rb +1 -1
- data/lib/omniauth/strategies/infinum_azure.rb +13 -11
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5f3293acb8cb3c28513fa2074257e56379aa9eb241eecde33fa46920fbad4459
|
4
|
+
data.tar.gz: f1b76ea5f410097d31de6a35235a070f130057b637d362a71faa298d6eda79a0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8c83144243122e6b82c34bac96a4c11db2ec2e25638165bb3ec1b256c1ac660e5463f7c4e133e99e96d6d121ac348ce0b00e4bce40b3f65d00f174bb2c1fc68b
|
7
|
+
data.tar.gz: 4ecbe18123fb2e2fb2e079ec07e301f70ddde3ee6fa5b8d0ef57f167ca170a4d786ef71d8d0fa6339ea1010c89e27314ae82e30f8c3cb3ceb1a1a010b8bcbf95
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -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, '
|
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
|
26
|
-
|
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.
|
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-
|
11
|
+
date: 2023-04-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|