omniauth-vis 0.0.6 → 0.0.8
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/README.md +2 -5
- data/lib/omniauth/strategies/vis.rb +5 -10
- data/omniauth-vis.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fff8038574bf91729b2f16a86e8ab9715838465182ec84d53bb52e99358eebf5
|
4
|
+
data.tar.gz: 0d594fa3bb66c5eef23860466287b70fad945689b1659091ce96d1dd9009b173
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ea3a60610a40dcf505c9640d5e3c954fe74a90efe1e78c35fdb9d80cd072c611664302a065285d0e4b1eeec802cba0d020a32354be98d7535563840d94fb7267
|
7
|
+
data.tar.gz: 6db202573cb2234b42d626230d798226ca2b4729d6fda9a54d35a57481e7be21c0e147f315d98e5db36eb542ea169b0c42e2385b2d9e0a837447cf14e0b0d76e
|
data/README.md
CHANGED
@@ -27,9 +27,9 @@ gem add omniauth-vis
|
|
27
27
|
# config/initializers/vis.rb
|
28
28
|
|
29
29
|
Rails.application.config.vis = {
|
30
|
+
server_url: "https://identity.dhamma.org/"
|
30
31
|
app_id: "APP_ID_PROVIDED",
|
31
32
|
app_secret: "APP_SECRET_PROVIDED",
|
32
|
-
app_url: "https://identity.server.dhamma.org/"
|
33
33
|
}
|
34
34
|
```
|
35
35
|
|
@@ -43,10 +43,7 @@ You first need to install `omniauth-oauth2` gem, then add a new provider :
|
|
43
43
|
require "omniauth/strategies/vis"
|
44
44
|
|
45
45
|
Rails.application.config.middleware.use OmniAuth::Builder do
|
46
|
-
provider :vis, Rails.application.config.vis["app_id"], Rails.application.config.vis["app_secret"]
|
47
|
-
{
|
48
|
-
scope: "default"
|
49
|
-
}
|
46
|
+
provider :vis, Rails.application.config.vis["app_id"], Rails.application.config.vis["app_secret"]
|
50
47
|
end
|
51
48
|
```
|
52
49
|
|
@@ -8,23 +8,18 @@ module OmniAuth
|
|
8
8
|
option :name, :vis
|
9
9
|
|
10
10
|
option :client_options,
|
11
|
-
site: Rails.application.config.vis['
|
11
|
+
site: Rails.application.config.vis['server_url'],
|
12
12
|
authorize_path: '/oauth/authorize'
|
13
13
|
|
14
|
+
option :scope, 'default'
|
15
|
+
|
14
16
|
def on_path?(path)
|
15
17
|
current_path.squeeze('/').casecmp(path.squeeze('/')).zero?
|
16
18
|
end
|
17
19
|
|
18
20
|
def setup_phase
|
19
|
-
# Authorize
|
20
|
-
|
21
|
-
:locale, :iframe,
|
22
|
-
:allow_sign_up, :allowed_external_providers, :confirm_identity,
|
23
|
-
:app_name, :login_title, :login_subtitle, :back_button,
|
24
|
-
:extra_agreement_title, :extra_agreement_text]
|
25
|
-
authorized_params.each do |param|
|
26
|
-
request.env['omniauth.strategy'].options[:authorize_params][param] = request.params[param.to_s]
|
27
|
-
end
|
21
|
+
# Authorize all params to be passed to VIS
|
22
|
+
request.env['omniauth.strategy'].options[:authorize_params] = request.params.to_h
|
28
23
|
end
|
29
24
|
|
30
25
|
uid do
|
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.0.8'
|
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'
|