omniauth-cronofy 0.9.0 → 0.10.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3e0e7501a9711c3f3d141dda702bfbf5c37ee617
4
- data.tar.gz: 92784956009981fc95d5f9b3e45eaf13ebab8932
3
+ metadata.gz: cad2832b9dd16bab6becf86df66186a7e851b64c
4
+ data.tar.gz: a5e3c5ebe071bb7f913b0cda338ea890465ff46c
5
5
  SHA512:
6
- metadata.gz: 943321f4df579cd5a26c705a9c954d0380c0936ec1d938391763076c9aad57eda56e4e2beaf59ffbc33971b44a5b723c2118618705e3645d38584ce798f5aac3
7
- data.tar.gz: 488e4b202f99f511e9a911a9ecba76470642bbb92faa12deff3cd4e1e5fcc8b1f8d8b620d2269227b116cb4753d054551bfeb8452926e3ad9b5adbcef117ed50
6
+ metadata.gz: 8095810326d3e95d44183f1041339220cc3bd581e5d4084d24bf83788a504ad1e61d90cccc67ae29bb5dfe5328e21913a0e8f89c6e8fe2cc8b6230bf4b4ee120
7
+ data.tar.gz: 34c69347289fa38479fada85fff971dcebf9a2053deea4ab6b7e38bc150e78c1f2f21f0da63d00a2fc189b4b087688c97ef2117c473e11db275dd1dae7a85546
data/README.md CHANGED
@@ -41,6 +41,14 @@ end
41
41
 
42
42
  Then to auth with Cronofy you would navigate to `/auth/cronofy`.
43
43
 
44
+ #### Explicit Linking
45
+
46
+ Cronofy supports [explicit linking of calendar accounts](https://www.cronofy.com/developers/api/alpha/#auth-explicit-linking) by passing a `link_token` to the auth flow. This strategy supports that token be passed as a query string parameter to the auth redirect.
47
+
48
+ ```
49
+ /auth/cronofy?link_token=hga672376....
50
+ ```
51
+
44
52
  ### Configuration
45
53
 
46
54
  Configurable options
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module Cronofy
3
- VERSION = '0.9.0'.freeze
3
+ VERSION = '0.10.0'.freeze
4
4
  end
5
5
  end
@@ -26,6 +26,15 @@ module OmniAuth
26
26
  def raw_info
27
27
  @raw_info ||= access_token.get("#{client_options[:api_url]}/v1/account").parsed['account']
28
28
  end
29
+
30
+ def request_phase
31
+ link_token = session['omniauth.params']['link_token']
32
+ if link_token && !link_token.empty?
33
+ options[:authorize_params] ||= {}
34
+ options[:authorize_params].merge!(:link_token => link_token)
35
+ end
36
+ super
37
+ end
29
38
  end
30
39
  end
31
40
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-cronofy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Bird
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-09-11 00:00:00.000000000 Z
11
+ date: 2017-09-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth
@@ -111,7 +111,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
111
111
  version: '0'
112
112
  requirements: []
113
113
  rubyforge_project:
114
- rubygems_version: 2.6.6
114
+ rubygems_version: 2.6.8
115
115
  signing_key:
116
116
  specification_version: 4
117
117
  summary: OmniAuth strategy for authenticating with Cronofy