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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ed544b35ae41fcac168fed379e50f7d902a2b5df391d890ad3a1d4d1048127a9
4
- data.tar.gz: 0cd53dcc8f84d27258978b5a19bad6fd3dfddf72a64aa37f19aa813d6ae45d01
3
+ metadata.gz: fff8038574bf91729b2f16a86e8ab9715838465182ec84d53bb52e99358eebf5
4
+ data.tar.gz: 0d594fa3bb66c5eef23860466287b70fad945689b1659091ce96d1dd9009b173
5
5
  SHA512:
6
- metadata.gz: 8ef43a41fb9830226da8a4096866c9add4a78ffa29317e34b66a1d1c225a7d500db426d1a77fb7451f853b84678ea184f52192fdb46917ccf727fee9a3cb141d
7
- data.tar.gz: dd92a0fc52674945a4f07f176b338d67bdef315888bf97975fa146f7993932bb2ecfc127cdab94037b7f8a5b46804fe8b323dccec8af55ebbe1dcc1fe966e2f2
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['app_url'],
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 extra params
20
- authorized_params = [
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.6'
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'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-vis
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dhamma workers