omniauth-createsend 0.0.1 → 0.0.2
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.
- data/Gemfile +0 -2
- data/Gemfile.lock +4 -10
- data/README.md +2 -2
- data/example/config.ru +7 -4
- data/lib/omniauth/createsend/version.rb +1 -1
- data/spec/omniauth/strategies/createsend_spec.rb +0 -4
- metadata +3 -3
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,15 +1,7 @@
|
|
|
1
|
-
GIT
|
|
2
|
-
remote: git://github.com/intridea/omniauth-oauth2.git
|
|
3
|
-
revision: 032c21f2585047b8a7bb335f4f64697f0e6247ab
|
|
4
|
-
specs:
|
|
5
|
-
omniauth-oauth2 (1.1.1)
|
|
6
|
-
oauth2 (~> 0.8.0)
|
|
7
|
-
omniauth (~> 1.0)
|
|
8
|
-
|
|
9
1
|
PATH
|
|
10
2
|
remote: .
|
|
11
3
|
specs:
|
|
12
|
-
omniauth-createsend (0.0.
|
|
4
|
+
omniauth-createsend (0.0.2)
|
|
13
5
|
omniauth-oauth2 (~> 1.1)
|
|
14
6
|
|
|
15
7
|
GEM
|
|
@@ -33,6 +25,9 @@ GEM
|
|
|
33
25
|
omniauth (1.1.1)
|
|
34
26
|
hashie (~> 1.2)
|
|
35
27
|
rack
|
|
28
|
+
omniauth-oauth2 (1.1.1)
|
|
29
|
+
oauth2 (~> 0.8.0)
|
|
30
|
+
omniauth (~> 1.0)
|
|
36
31
|
rack (1.5.1)
|
|
37
32
|
rake (10.0.3)
|
|
38
33
|
rspec (2.12.0)
|
|
@@ -49,6 +44,5 @@ PLATFORMS
|
|
|
49
44
|
|
|
50
45
|
DEPENDENCIES
|
|
51
46
|
omniauth-createsend!
|
|
52
|
-
omniauth-oauth2!
|
|
53
47
|
rake
|
|
54
48
|
rspec (~> 2.12)
|
data/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# OmniAuth CreateSend
|
|
2
2
|
|
|
3
|
-
This is the official OmniAuth strategy for authenticating with the [Campaign Monitor API](http://www.campaignmonitor.com/api/).
|
|
3
|
+
This is the official OmniAuth strategy for authenticating with the [Campaign Monitor API](http://www.campaignmonitor.com/api/). You'll need to register an OAuth Application in your Campaign Monitor account to get a Client ID and Client Secret to use with this OmniAuth strategy.
|
|
4
4
|
|
|
5
5
|
## Installing
|
|
6
6
|
|
|
@@ -16,6 +16,6 @@ Then `bundle install`.
|
|
|
16
16
|
|
|
17
17
|
```ruby
|
|
18
18
|
use OmniAuth::Builder do
|
|
19
|
-
provider "createsend", ENV['CREATESEND_CLIENT_ID'], ENV['CREATESEND_CLIENT_SECRET']
|
|
19
|
+
provider "createsend", ENV['CREATESEND_CLIENT_ID'], ENV['CREATESEND_CLIENT_SECRET'], :scope => 'ViewReports,CreateCampaigns,SendCampaigns'
|
|
20
20
|
end
|
|
21
21
|
```
|
data/example/config.ru
CHANGED
|
@@ -7,9 +7,12 @@ class App < Sinatra::Base
|
|
|
7
7
|
redirect '/auth/createsend'
|
|
8
8
|
end
|
|
9
9
|
|
|
10
|
-
get '/auth
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
get '/auth/createsend/callback' do
|
|
11
|
+
response = "Your user is successfully authenticated. Here are you details you need:<br/><br/>"
|
|
12
|
+
response << "token: #{request.env['omniauth.auth']['credentials']['token']}<br/>"
|
|
13
|
+
response << "refresh token: #{request.env['omniauth.auth']['credentials']['refresh_token']}<br/>"
|
|
14
|
+
response << "expires at: #{request.env['omniauth.auth']['credentials']['expires_at']}<br/>"
|
|
15
|
+
response
|
|
13
16
|
end
|
|
14
17
|
|
|
15
18
|
get '/auth/failure' do
|
|
@@ -22,7 +25,7 @@ use Rack::Session::Cookie
|
|
|
22
25
|
|
|
23
26
|
use OmniAuth::Builder do
|
|
24
27
|
provider :createsend, ENV['CREATESEND_CLIENT_ID'], ENV['CREATESEND_CLIENT_SECRET'],
|
|
25
|
-
:scope => 'ViewReports,
|
|
28
|
+
:scope => 'ViewReports,CreateCampaigns,SendCampaigns'
|
|
26
29
|
end
|
|
27
30
|
|
|
28
31
|
run App.new
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: omniauth-createsend
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.2
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -98,7 +98,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
98
98
|
version: '0'
|
|
99
99
|
segments:
|
|
100
100
|
- 0
|
|
101
|
-
hash:
|
|
101
|
+
hash: -4366650925290382885
|
|
102
102
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
103
103
|
none: false
|
|
104
104
|
requirements:
|
|
@@ -107,7 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
107
107
|
version: '0'
|
|
108
108
|
segments:
|
|
109
109
|
- 0
|
|
110
|
-
hash:
|
|
110
|
+
hash: -4366650925290382885
|
|
111
111
|
requirements: []
|
|
112
112
|
rubyforge_project:
|
|
113
113
|
rubygems_version: 1.8.24
|