omniauth-redbooth 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.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/README.md +1 -1
- data/examples/config.ru +10 -4
- data/lib/omniauth/strategies/redbooth.rb +3 -3
- data/lib/omniauth-redbooth/version.rb +1 -1
- data/omniauth-redbooth.gemspec +0 -1
- metadata +20 -21
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 497ced87158928f9bb760b138ee505b3dd217163
|
|
4
|
+
data.tar.gz: 056079de14928a5da3660b888c82f243c9152fc8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 78c9cdd7d8ba4ff05de6141c7ec2a37336d16711fdf4e95d519bec046956ff9be70d729ce1c5e726d72c8541f6ef5710dd30cbc40c79166881baa4fdbf417741
|
|
7
|
+
data.tar.gz: 062e5e7bb0974beb7346d56b481398da742797aa39d1407b332063a47f59bf86994cb628c65c9ea6b073a23d8b81c96f1b433eadcb10062d04486fce381059cb
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
omniauth-
|
|
4
|
+
omniauth-redbooth (0.0.2)
|
|
5
5
|
omniauth (~> 1.0)
|
|
6
6
|
omniauth-oauth2 (~> 1.1.1)
|
|
7
7
|
|
|
@@ -124,7 +124,7 @@ DEPENDENCIES
|
|
|
124
124
|
guard
|
|
125
125
|
guard-bundler
|
|
126
126
|
guard-rspec
|
|
127
|
-
omniauth-
|
|
127
|
+
omniauth-redbooth!
|
|
128
128
|
rack-test
|
|
129
129
|
rake
|
|
130
130
|
rb-fsevent
|
data/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# OmniAuth Redbooth.com
|
|
2
2
|
|
|
3
3
|
An official OmniAuth strategy for authenticating to Redbooth.com using OAuth2. To use it, you'll
|
|
4
|
-
need to have a Redbooth.com [developer account](
|
|
4
|
+
need to have a Redbooth.com [developer account](http://developer.redbooth.com/).
|
|
5
5
|
|
|
6
6
|
## Installation
|
|
7
7
|
|
data/examples/config.ru
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
require 'sinatra/base'
|
|
2
2
|
require 'omniauth-redbooth'
|
|
3
3
|
require 'multi_json'
|
|
4
|
+
require 'pry'
|
|
4
5
|
|
|
5
6
|
class OmniauthRedbooth < Sinatra::Base
|
|
6
7
|
|
|
@@ -16,10 +17,12 @@ class OmniauthRedbooth < Sinatra::Base
|
|
|
16
17
|
end
|
|
17
18
|
|
|
18
19
|
get '/auth/:provider/callback' do
|
|
19
|
-
|
|
20
|
+
request
|
|
21
|
+
MultiJson.encode(request.env['omniauth.auth'])
|
|
20
22
|
end
|
|
21
23
|
|
|
22
24
|
get '/auth/failure' do
|
|
25
|
+
request
|
|
23
26
|
MultiJson.encode(request.env)
|
|
24
27
|
end
|
|
25
28
|
|
|
@@ -44,12 +47,15 @@ end
|
|
|
44
47
|
use Rack::Session::Cookie, :secret => 'secret identity'
|
|
45
48
|
|
|
46
49
|
use OmniAuth::Builder do
|
|
47
|
-
provider :redbooth,
|
|
50
|
+
provider :redbooth,
|
|
51
|
+
ENV['CONSUMER_KEY'] || '_your_consumer_key_',
|
|
52
|
+
ENV['CONSUMER_SECRET'] || '_your_consumer_secret_',
|
|
48
53
|
client_options: {
|
|
49
|
-
site: 'http://localhost:3000/api/
|
|
54
|
+
site: 'http://localhost:3000/api/3',
|
|
50
55
|
token_url: 'http://localhost:3000/oauth2/token',
|
|
51
56
|
authorize_url: 'http://localhost:3000/oauth2/authorize'
|
|
52
|
-
}
|
|
57
|
+
},
|
|
58
|
+
scope: 'all'
|
|
53
59
|
end
|
|
54
60
|
|
|
55
61
|
run OmniauthRedbooth.new
|
|
@@ -12,8 +12,8 @@ module OmniAuth
|
|
|
12
12
|
# initializing your consumer from the OAuth gem.
|
|
13
13
|
option :client_options, {
|
|
14
14
|
site: 'https://redbooth.com/api/3',
|
|
15
|
-
authorize_url: 'https://redbooth.com/
|
|
16
|
-
token_url: 'https://redbooth.com/
|
|
15
|
+
authorize_url: 'https://redbooth.com/oauth2/authorize',
|
|
16
|
+
token_url: 'https://redbooth.com/oauth2/token'
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
option :authorize_params, {
|
|
@@ -41,7 +41,7 @@ module OmniAuth
|
|
|
41
41
|
end
|
|
42
42
|
|
|
43
43
|
def raw_info
|
|
44
|
-
@raw_info ||= access_token.get("#{options[:client_options][:site]}/
|
|
44
|
+
@raw_info ||= access_token.get("#{options[:client_options][:site]}/me").parsed
|
|
45
45
|
end
|
|
46
46
|
end
|
|
47
47
|
end
|
data/omniauth-redbooth.gemspec
CHANGED
|
@@ -4,7 +4,6 @@ Gem::Specification.new do |gem|
|
|
|
4
4
|
gem.authors = ["Andres Bravo", "Carlos Saura", "Pau Ramon"]
|
|
5
5
|
gem.email = ["support@redbooth.com"]
|
|
6
6
|
gem.description = %q{Official OmniAuth strategy for Redbooth.com.}
|
|
7
|
-
gem.licenses = ['MIT']
|
|
8
7
|
gem.summary = gem.description
|
|
9
8
|
gem.homepage = "https://github.com/redbooth/omniauth-redbooth"
|
|
10
9
|
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: omniauth-redbooth
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Andres Bravo
|
|
@@ -10,90 +10,90 @@ authors:
|
|
|
10
10
|
autorequire:
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date: 2014-
|
|
13
|
+
date: 2014-08-28 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: omniauth
|
|
17
17
|
requirement: !ruby/object:Gem::Requirement
|
|
18
18
|
requirements:
|
|
19
|
-
- - ~>
|
|
19
|
+
- - "~>"
|
|
20
20
|
- !ruby/object:Gem::Version
|
|
21
21
|
version: '1.0'
|
|
22
22
|
type: :runtime
|
|
23
23
|
prerelease: false
|
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
|
25
25
|
requirements:
|
|
26
|
-
- - ~>
|
|
26
|
+
- - "~>"
|
|
27
27
|
- !ruby/object:Gem::Version
|
|
28
28
|
version: '1.0'
|
|
29
29
|
- !ruby/object:Gem::Dependency
|
|
30
30
|
name: omniauth-oauth2
|
|
31
31
|
requirement: !ruby/object:Gem::Requirement
|
|
32
32
|
requirements:
|
|
33
|
-
- - ~>
|
|
33
|
+
- - "~>"
|
|
34
34
|
- !ruby/object:Gem::Version
|
|
35
35
|
version: 1.1.1
|
|
36
36
|
type: :runtime
|
|
37
37
|
prerelease: false
|
|
38
38
|
version_requirements: !ruby/object:Gem::Requirement
|
|
39
39
|
requirements:
|
|
40
|
-
- - ~>
|
|
40
|
+
- - "~>"
|
|
41
41
|
- !ruby/object:Gem::Version
|
|
42
42
|
version: 1.1.1
|
|
43
43
|
- !ruby/object:Gem::Dependency
|
|
44
44
|
name: rspec
|
|
45
45
|
requirement: !ruby/object:Gem::Requirement
|
|
46
46
|
requirements:
|
|
47
|
-
- - ~>
|
|
47
|
+
- - "~>"
|
|
48
48
|
- !ruby/object:Gem::Version
|
|
49
49
|
version: '2.7'
|
|
50
50
|
type: :development
|
|
51
51
|
prerelease: false
|
|
52
52
|
version_requirements: !ruby/object:Gem::Requirement
|
|
53
53
|
requirements:
|
|
54
|
-
- - ~>
|
|
54
|
+
- - "~>"
|
|
55
55
|
- !ruby/object:Gem::Version
|
|
56
56
|
version: '2.7'
|
|
57
57
|
- !ruby/object:Gem::Dependency
|
|
58
58
|
name: rack-test
|
|
59
59
|
requirement: !ruby/object:Gem::Requirement
|
|
60
60
|
requirements:
|
|
61
|
-
- -
|
|
61
|
+
- - ">="
|
|
62
62
|
- !ruby/object:Gem::Version
|
|
63
63
|
version: '0'
|
|
64
64
|
type: :development
|
|
65
65
|
prerelease: false
|
|
66
66
|
version_requirements: !ruby/object:Gem::Requirement
|
|
67
67
|
requirements:
|
|
68
|
-
- -
|
|
68
|
+
- - ">="
|
|
69
69
|
- !ruby/object:Gem::Version
|
|
70
70
|
version: '0'
|
|
71
71
|
- !ruby/object:Gem::Dependency
|
|
72
72
|
name: simplecov
|
|
73
73
|
requirement: !ruby/object:Gem::Requirement
|
|
74
74
|
requirements:
|
|
75
|
-
- -
|
|
75
|
+
- - ">="
|
|
76
76
|
- !ruby/object:Gem::Version
|
|
77
77
|
version: '0'
|
|
78
78
|
type: :development
|
|
79
79
|
prerelease: false
|
|
80
80
|
version_requirements: !ruby/object:Gem::Requirement
|
|
81
81
|
requirements:
|
|
82
|
-
- -
|
|
82
|
+
- - ">="
|
|
83
83
|
- !ruby/object:Gem::Version
|
|
84
84
|
version: '0'
|
|
85
85
|
- !ruby/object:Gem::Dependency
|
|
86
86
|
name: webmock
|
|
87
87
|
requirement: !ruby/object:Gem::Requirement
|
|
88
88
|
requirements:
|
|
89
|
-
- -
|
|
89
|
+
- - ">="
|
|
90
90
|
- !ruby/object:Gem::Version
|
|
91
91
|
version: '0'
|
|
92
92
|
type: :development
|
|
93
93
|
prerelease: false
|
|
94
94
|
version_requirements: !ruby/object:Gem::Requirement
|
|
95
95
|
requirements:
|
|
96
|
-
- -
|
|
96
|
+
- - ">="
|
|
97
97
|
- !ruby/object:Gem::Version
|
|
98
98
|
version: '0'
|
|
99
99
|
description: Official OmniAuth strategy for Redbooth.com.
|
|
@@ -103,8 +103,8 @@ executables: []
|
|
|
103
103
|
extensions: []
|
|
104
104
|
extra_rdoc_files: []
|
|
105
105
|
files:
|
|
106
|
-
- .gitignore
|
|
107
|
-
- .travis.yml
|
|
106
|
+
- ".gitignore"
|
|
107
|
+
- ".travis.yml"
|
|
108
108
|
- Gemfile
|
|
109
109
|
- Gemfile.lock
|
|
110
110
|
- Guardfile
|
|
@@ -119,8 +119,7 @@ files:
|
|
|
119
119
|
- spec/omniauth/strategies/redbooth_spec.rb
|
|
120
120
|
- spec/spec_helper.rb
|
|
121
121
|
homepage: https://github.com/redbooth/omniauth-redbooth
|
|
122
|
-
licenses:
|
|
123
|
-
- MIT
|
|
122
|
+
licenses: []
|
|
124
123
|
metadata: {}
|
|
125
124
|
post_install_message:
|
|
126
125
|
rdoc_options: []
|
|
@@ -128,17 +127,17 @@ require_paths:
|
|
|
128
127
|
- lib
|
|
129
128
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
130
129
|
requirements:
|
|
131
|
-
- -
|
|
130
|
+
- - ">="
|
|
132
131
|
- !ruby/object:Gem::Version
|
|
133
132
|
version: '0'
|
|
134
133
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
135
134
|
requirements:
|
|
136
|
-
- -
|
|
135
|
+
- - ">="
|
|
137
136
|
- !ruby/object:Gem::Version
|
|
138
137
|
version: '0'
|
|
139
138
|
requirements: []
|
|
140
139
|
rubyforge_project:
|
|
141
|
-
rubygems_version: 2.
|
|
140
|
+
rubygems_version: 2.2.2
|
|
142
141
|
signing_key:
|
|
143
142
|
specification_version: 4
|
|
144
143
|
summary: Official OmniAuth strategy for Redbooth.com.
|