doorkeeper 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of doorkeeper might be problematic. Click here for more details.
- data/README.md +42 -14
- data/Rakefile +1 -1
- data/app/assets/stylesheets/doorkeeper/application.css +4 -0
- data/app/controllers/doorkeeper/application_controller.rb +2 -2
- data/app/controllers/doorkeeper/application_controller.rbc +32 -20
- data/app/controllers/doorkeeper/authorizations_controller.rbc +86 -22
- data/app/controllers/doorkeeper/authorized_applications_controller.rb +13 -0
- data/app/controllers/doorkeeper/authorized_applications_controller.rbc +393 -0
- data/app/controllers/doorkeeper/tokens_controller.rb +4 -0
- data/app/models/access_grant.rb +8 -0
- data/app/models/access_grant.rbc +204 -39
- data/app/models/access_token.rb +31 -3
- data/app/models/access_token.rbc +270 -72
- data/app/models/application.rb +8 -1
- data/app/models/application.rbc +307 -61
- data/app/views/doorkeeper/authorizations/new.html.erb +17 -0
- data/app/views/doorkeeper/authorized_applications/index.html.erb +26 -0
- data/config/routes.rb +1 -0
- data/config/routes.rbc +48 -4
- data/lib/doorkeeper/config.rb +82 -22
- data/lib/doorkeeper/config.rbc +739 -295
- data/lib/doorkeeper/config/scope.rb +11 -0
- data/lib/doorkeeper/config/scopes.rb +57 -0
- data/lib/doorkeeper/config/scopes_builder.rb +18 -0
- data/lib/doorkeeper/doorkeeper_for.rb +96 -16
- data/lib/doorkeeper/oauth/access_token_request.rb +57 -18
- data/lib/doorkeeper/oauth/access_token_request.rbc +256 -67
- data/lib/doorkeeper/oauth/authorization_request.rb +31 -4
- data/lib/doorkeeper/oauth/authorization_request.rbc +230 -65
- data/lib/doorkeeper/version.rb +1 -1
- data/lib/doorkeeper/version.rbc +1 -1
- data/lib/generators/doorkeeper/templates/README +3 -0
- data/lib/generators/doorkeeper/templates/initializer.rb +13 -0
- data/lib/generators/doorkeeper/templates/migration.rb +4 -1
- metadata +35 -18
data/lib/doorkeeper/version.rb
CHANGED
data/lib/doorkeeper/version.rbc
CHANGED
@@ -20,4 +20,17 @@ Doorkeeper.configure do
|
|
20
20
|
# # routes.new_admin_session_path
|
21
21
|
# Admin.find_by_id(session[:admin_id]) || redirect_to routes.new_admin_session_path
|
22
22
|
# end
|
23
|
+
|
24
|
+
# Access token expiration time (default 2 hours)
|
25
|
+
# access_token_expires_in 2.hours
|
26
|
+
|
27
|
+
# Issue access tokens with refresh token (disabled by default)
|
28
|
+
# use_refresh_token
|
29
|
+
|
30
|
+
# Define access token scopes for your provider
|
31
|
+
# For more information go to https://github.com/applicake/doorkeeper/wiki/Using-Scopes
|
32
|
+
# authorization_scopes do
|
33
|
+
# scope :public, :default => true, :description => "The public one"
|
34
|
+
# scope :write, :description => "Updating information"
|
35
|
+
# end
|
23
36
|
end
|
@@ -16,15 +16,18 @@ class CreateDoorkeeperTables < ActiveRecord::Migration
|
|
16
16
|
t.string :redirect_uri, :null => false
|
17
17
|
t.datetime :created_at, :null => false
|
18
18
|
t.datetime :revoked_at
|
19
|
+
t.string :scopes
|
19
20
|
end
|
20
21
|
|
21
22
|
create_table :oauth_access_tokens do |t|
|
22
23
|
t.integer :resource_owner_id, :null => false
|
23
24
|
t.integer :application_id, :null => false
|
24
25
|
t.string :token, :null => false
|
25
|
-
t.
|
26
|
+
t.string :refresh_token
|
27
|
+
t.integer :expires_in
|
26
28
|
t.datetime :revoked_at
|
27
29
|
t.datetime :created_at, :null => false
|
30
|
+
t.string :scopes
|
28
31
|
end
|
29
32
|
end
|
30
33
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: doorkeeper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,11 +10,11 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2011-
|
13
|
+
date: 2011-12-17 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rails
|
17
|
-
requirement: &
|
17
|
+
requirement: &70330040514360 !ruby/object:Gem::Requirement
|
18
18
|
none: false
|
19
19
|
requirements:
|
20
20
|
- - ~>
|
@@ -22,10 +22,10 @@ dependencies:
|
|
22
22
|
version: 3.1.1
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
|
-
version_requirements: *
|
25
|
+
version_requirements: *70330040514360
|
26
26
|
- !ruby/object:Gem::Dependency
|
27
27
|
name: sqlite3
|
28
|
-
requirement: &
|
28
|
+
requirement: &70330040513880 !ruby/object:Gem::Requirement
|
29
29
|
none: false
|
30
30
|
requirements:
|
31
31
|
- - ! '>='
|
@@ -33,10 +33,10 @@ dependencies:
|
|
33
33
|
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
|
-
version_requirements: *
|
36
|
+
version_requirements: *70330040513880
|
37
37
|
- !ruby/object:Gem::Dependency
|
38
38
|
name: rspec-rails
|
39
|
-
requirement: &
|
39
|
+
requirement: &70330040513400 !ruby/object:Gem::Requirement
|
40
40
|
none: false
|
41
41
|
requirements:
|
42
42
|
- - ! '>='
|
@@ -44,10 +44,10 @@ dependencies:
|
|
44
44
|
version: '0'
|
45
45
|
type: :development
|
46
46
|
prerelease: false
|
47
|
-
version_requirements: *
|
47
|
+
version_requirements: *70330040513400
|
48
48
|
- !ruby/object:Gem::Dependency
|
49
49
|
name: capybara
|
50
|
-
requirement: &
|
50
|
+
requirement: &70330040512980 !ruby/object:Gem::Requirement
|
51
51
|
none: false
|
52
52
|
requirements:
|
53
53
|
- - ! '>='
|
@@ -55,10 +55,10 @@ dependencies:
|
|
55
55
|
version: '0'
|
56
56
|
type: :development
|
57
57
|
prerelease: false
|
58
|
-
version_requirements: *
|
58
|
+
version_requirements: *70330040512980
|
59
59
|
- !ruby/object:Gem::Dependency
|
60
60
|
name: generator_spec
|
61
|
-
requirement: &
|
61
|
+
requirement: &70330040528920 !ruby/object:Gem::Requirement
|
62
62
|
none: false
|
63
63
|
requirements:
|
64
64
|
- - ! '>='
|
@@ -66,10 +66,10 @@ dependencies:
|
|
66
66
|
version: '0'
|
67
67
|
type: :development
|
68
68
|
prerelease: false
|
69
|
-
version_requirements: *
|
69
|
+
version_requirements: *70330040528920
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
71
|
name: factory_girl_rails
|
72
|
-
requirement: &
|
72
|
+
requirement: &70330040528460 !ruby/object:Gem::Requirement
|
73
73
|
none: false
|
74
74
|
requirements:
|
75
75
|
- - ! '>='
|
@@ -77,10 +77,10 @@ dependencies:
|
|
77
77
|
version: '0'
|
78
78
|
type: :development
|
79
79
|
prerelease: false
|
80
|
-
version_requirements: *
|
80
|
+
version_requirements: *70330040528460
|
81
81
|
- !ruby/object:Gem::Dependency
|
82
82
|
name: timecop
|
83
|
-
requirement: &
|
83
|
+
requirement: &70330040528000 !ruby/object:Gem::Requirement
|
84
84
|
none: false
|
85
85
|
requirements:
|
86
86
|
- - ! '>='
|
@@ -88,7 +88,18 @@ dependencies:
|
|
88
88
|
version: '0'
|
89
89
|
type: :development
|
90
90
|
prerelease: false
|
91
|
-
version_requirements: *
|
91
|
+
version_requirements: *70330040528000
|
92
|
+
- !ruby/object:Gem::Dependency
|
93
|
+
name: database_cleaner
|
94
|
+
requirement: &70330040527560 !ruby/object:Gem::Requirement
|
95
|
+
none: false
|
96
|
+
requirements:
|
97
|
+
- - ! '>='
|
98
|
+
- !ruby/object:Gem::Version
|
99
|
+
version: '0'
|
100
|
+
type: :development
|
101
|
+
prerelease: false
|
102
|
+
version_requirements: *70330040527560
|
92
103
|
description: Doorkeeper is an OAuth 2 provider for Rails.
|
93
104
|
email:
|
94
105
|
- felipe@applicake.com
|
@@ -106,6 +117,8 @@ files:
|
|
106
117
|
- app/controllers/doorkeeper/applications_controller.rbc
|
107
118
|
- app/controllers/doorkeeper/authorizations_controller.rb
|
108
119
|
- app/controllers/doorkeeper/authorizations_controller.rbc
|
120
|
+
- app/controllers/doorkeeper/authorized_applications_controller.rb
|
121
|
+
- app/controllers/doorkeeper/authorized_applications_controller.rbc
|
109
122
|
- app/controllers/doorkeeper/tokens_controller.rb
|
110
123
|
- app/controllers/doorkeeper/tokens_controller.rbc
|
111
124
|
- app/helpers/doorkeeper/application_helper.rb
|
@@ -123,11 +136,15 @@ files:
|
|
123
136
|
- app/views/doorkeeper/applications/show.html.erb
|
124
137
|
- app/views/doorkeeper/authorizations/error.html.erb
|
125
138
|
- app/views/doorkeeper/authorizations/new.html.erb
|
139
|
+
- app/views/doorkeeper/authorized_applications/index.html.erb
|
126
140
|
- app/views/layouts/doorkeeper/application.html.erb
|
127
141
|
- config/initializers/form_errors.rb
|
128
142
|
- config/initializers/form_errors.rbc
|
129
143
|
- config/routes.rb
|
130
144
|
- config/routes.rbc
|
145
|
+
- lib/doorkeeper/config/scope.rb
|
146
|
+
- lib/doorkeeper/config/scopes.rb
|
147
|
+
- lib/doorkeeper/config/scopes_builder.rb
|
131
148
|
- lib/doorkeeper/config.rb
|
132
149
|
- lib/doorkeeper/config.rbc
|
133
150
|
- lib/doorkeeper/doorkeeper_for.rb
|
@@ -170,7 +187,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
170
187
|
version: '0'
|
171
188
|
segments:
|
172
189
|
- 0
|
173
|
-
hash:
|
190
|
+
hash: -4506102143272219054
|
174
191
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
175
192
|
none: false
|
176
193
|
requirements:
|
@@ -179,7 +196,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
179
196
|
version: '0'
|
180
197
|
segments:
|
181
198
|
- 0
|
182
|
-
hash:
|
199
|
+
hash: -4506102143272219054
|
183
200
|
requirements: []
|
184
201
|
rubyforge_project:
|
185
202
|
rubygems_version: 1.8.11
|