omniauth-vis 0.0.9 → 0.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 +4 -4
- data/lib/omniauth/strategies/vis.rb +10 -5
- data/omniauth-vis.gemspec +1 -1
- 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: 2c033910cb1b4079859bd39ac8f335d4851fe71ba884d49e67b5c290954f9bae
|
4
|
+
data.tar.gz: e7ad31f822e75d60f2834818fa73a90f7340d21458827bb1abe4c68eaf0a1558
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fd676cdec4deafc8ff4768e4277163689d9d76b1416a9610cdff112b80269fcc1af2dbb324b8ce04eaf6fd84763342738adc34ebdc6096e8b4656ac653f60502
|
7
|
+
data.tar.gz: 8c629c538a57de590710ed7f7faeb578fc5d951ba45aa22870da952fd76e9370322f2c348204f9c84534a23106336189cf463d526393ec41722b9daa84246dec
|
@@ -8,18 +8,18 @@ module OmniAuth
|
|
8
8
|
option :name, :vis
|
9
9
|
|
10
10
|
option :client_options,
|
11
|
-
site: Rails.application.config.vis['server_url'],
|
12
11
|
authorize_path: '/oauth/authorize'
|
13
12
|
|
14
13
|
option :scope, 'default'
|
15
14
|
|
16
|
-
|
17
|
-
current_path.squeeze('/').casecmp(path.squeeze('/')).zero?
|
18
|
-
end
|
15
|
+
option :server_url, "https://identity.dhamma.org"
|
19
16
|
|
20
17
|
def setup_phase
|
18
|
+
# configure Oauth2 client_options.site from a custom server_url option
|
19
|
+
options.client_options.site = options.server_url
|
20
|
+
|
21
21
|
# Authorize all params to be passed to VIS
|
22
|
-
|
22
|
+
options.authorize_params = request.params.to_h
|
23
23
|
end
|
24
24
|
|
25
25
|
uid do
|
@@ -30,6 +30,11 @@ module OmniAuth
|
|
30
30
|
raw_info
|
31
31
|
end
|
32
32
|
|
33
|
+
# Fix strange bugs with urls containing double / like dhamma.org//oauth/callback
|
34
|
+
def on_path?(path)
|
35
|
+
current_path.squeeze('/').casecmp(path.squeeze('/')).zero?
|
36
|
+
end
|
37
|
+
|
33
38
|
# to fix always getting invalid_grant error
|
34
39
|
# see https://github.com/omniauth/omniauth-oauth2/issues/81#issuecomment-231442739
|
35
40
|
def callback_url
|
data/omniauth-vis.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |gem|
|
4
4
|
gem.name = 'omniauth-vis'
|
5
|
-
gem.version = '0.0
|
5
|
+
gem.version = '0.1.0'
|
6
6
|
# gem.license = 'MIT'
|
7
7
|
gem.summary = 'Helper to connect to Vipassna Identity Server'
|
8
8
|
gem.description = 'This allows you to connect to Vipassana identity server with your ruby app'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-vis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dhamma workers
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-09-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: omniauth-oauth2
|