omniauth-myadventist 0.1.2 → 0.1.3

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
  SHA1:
3
- metadata.gz: 65fb1fa795d5fe930f9a127f156d4065be810636
4
- data.tar.gz: 8ef9cd6a3feb3cdbb55d08f3361dc7f6929e81cb
3
+ metadata.gz: 8d64c37a0149cee51d48ffb38b74619c9d5e7db0
4
+ data.tar.gz: 6cbcefcd8a60c7030ccf93a4b0f59b7487196931
5
5
  SHA512:
6
- metadata.gz: 1a4ea56f6f4f2e11a45504384269a5f0d64921f52836ff907da8d5766e814e7a2791d82de009dc235dd4d66ad87475c32c83c404ffb66004c0490ace57afd168
7
- data.tar.gz: 4973ddb7238ec3014bf72192e2d894f4cb36b373845327ea2e15857e534acb7f4fcf1ed8f54ac1edda3dbde462e219429dde19f070988e0436cd5f62cbc791eb
6
+ metadata.gz: 9346d139e8bd7cc57d86c99bb9c372f3cebad67963da6b74d31f6d92c78e9314a5f237045aef3d7dcf64fabe4e48eb492d43e06b6ae76b62a0cddeb4a17b9c77
7
+ data.tar.gz: 533f70c4ee57685af93e17aaa302d5626cddc4632f19abf800eefca134b9bdc5fe034e6e01af34f063d3fb22e111cf29b408c660334a0b36a64a788438abde6d
data/README.md CHANGED
@@ -27,6 +27,16 @@ Rails.application.config.middleware.use OmniAuth::Builder do
27
27
  end
28
28
  ```
29
29
 
30
+ To use https://test.myadventist.org you can override the client site:
31
+
32
+ ```ruby
33
+ Rails.application.config.middleware.use OmniAuth::Builder do
34
+ client_options = {}
35
+ client_options[:site] = 'https://test.myadventist.org.au' unless Rails.env.production?
36
+ provider :myadventist, Rails.application.secrets.myadventist_client_key, Rails.application.secrets.myadventist_client_secret, client_options: client_options
37
+ end
38
+ ```
39
+
30
40
  A callback URL also needs to be added to routes.rb The route can point to any controller action of your choice.
31
41
 
32
42
  ```ruby
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module Myadventist
3
- VERSION = "0.1.2"
3
+ VERSION = "0.1.3"
4
4
  end
5
5
  end
@@ -6,9 +6,10 @@ module OmniAuth
6
6
 
7
7
  option :name, 'myadventist'
8
8
  option :client_options, {
9
- site: 'https://test.myadventist.org.au',
9
+ site: 'https://myadventist.org.au',
10
10
  authorize_url: '/oauth/authorize',
11
- token_url: '/oauth/gettoken'
11
+ token_url: '/oauth/gettoken',
12
+ info_url: '/oauth/userinfo'
12
13
  }
13
14
 
14
15
  uid { raw_info['UserId'] }
@@ -23,7 +24,7 @@ module OmniAuth
23
24
  end
24
25
 
25
26
  def raw_info
26
- @raw_info ||= access_token.post('https://test.myadventist.org.au/oauth/userinfo', params: raw_info_params).parsed || {}
27
+ @raw_info ||= access_token.post(client.site + client.options[:info_url], params: raw_info_params).parsed || {}
27
28
  end
28
29
 
29
30
  def raw_info_params
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-myadventist
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Lewis
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-11-21 00:00:00.000000000 Z
11
+ date: 2016-12-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth-oauth2