doorkeeper 0.3.4 → 0.4.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.

Files changed (92) hide show
  1. data/CHANGELOG.md +13 -0
  2. data/README.md +32 -5
  3. data/app/controllers/doorkeeper/application_controller.rb +4 -11
  4. data/app/controllers/doorkeeper/authorizations_controller.rb +11 -2
  5. data/app/controllers/doorkeeper/tokens_controller.rb +19 -5
  6. data/app/models/doorkeeper/access_grant.rb +1 -8
  7. data/app/models/doorkeeper/access_token.rb +2 -10
  8. data/app/models/doorkeeper/application.rb +4 -0
  9. data/app/views/doorkeeper/authorizations/error.html.erb +1 -1
  10. data/app/views/doorkeeper/authorizations/new.html.erb +1 -1
  11. data/config/locales/en.yml +3 -0
  12. data/doorkeeper.gemspec +2 -1
  13. data/lib/doorkeeper.rb +23 -3
  14. data/lib/doorkeeper/config.rb +73 -12
  15. data/lib/doorkeeper/doorkeeper_for.rb +1 -1
  16. data/lib/doorkeeper/engine.rb +28 -0
  17. data/lib/doorkeeper/models/scopes.rb +13 -0
  18. data/lib/doorkeeper/oauth/access_token_request.rb +5 -16
  19. data/lib/doorkeeper/oauth/authorization/code.rb +1 -1
  20. data/lib/doorkeeper/oauth/authorization/token.rb +1 -1
  21. data/lib/doorkeeper/oauth/authorization_request.rb +18 -23
  22. data/lib/doorkeeper/oauth/client.rb +27 -0
  23. data/lib/doorkeeper/oauth/client/credentials.rb +21 -0
  24. data/lib/doorkeeper/oauth/client/methods.rb +18 -0
  25. data/lib/doorkeeper/oauth/client_credentials/creator.rb +29 -0
  26. data/lib/doorkeeper/oauth/client_credentials/issuer.rb +35 -0
  27. data/lib/doorkeeper/oauth/client_credentials/response.rb +42 -0
  28. data/lib/doorkeeper/oauth/client_credentials/validation.rb +33 -0
  29. data/lib/doorkeeper/oauth/client_credentials_request.rb +46 -0
  30. data/lib/doorkeeper/oauth/error.rb +9 -0
  31. data/lib/doorkeeper/oauth/error_response.rb +30 -0
  32. data/lib/doorkeeper/oauth/helpers/scope_checker.rb +2 -2
  33. data/lib/doorkeeper/oauth/password_access_token_request.rb +130 -0
  34. data/lib/doorkeeper/oauth/scopes.rb +60 -0
  35. data/lib/doorkeeper/version.rb +1 -1
  36. data/lib/generators/doorkeeper/templates/initializer.rb +10 -5
  37. data/lib/generators/doorkeeper/templates/migration.rb +1 -1
  38. data/script/run_all +11 -0
  39. data/spec/controllers/authorizations_controller_spec.rb +3 -3
  40. data/spec/controllers/protected_resources_controller_spec.rb +7 -0
  41. data/spec/controllers/tokens_controller_spec.rb +1 -1
  42. data/spec/dummy/app/controllers/home_controller.rb +1 -1
  43. data/spec/dummy/app/models/user.rb +9 -0
  44. data/spec/dummy/config/application.rb +2 -0
  45. data/spec/dummy/config/initializers/doorkeeper.rb +12 -5
  46. data/spec/dummy/config/locales/doorkeeper.en.yml +5 -0
  47. data/spec/dummy/db/migrate/20120312140401_add_password_to_users.rb +5 -0
  48. data/spec/dummy/db/migrate/{20111206151426_create_doorkeeper_tables.rb → 20120524202412_create_doorkeeper_tables.rb} +10 -1
  49. data/spec/dummy/db/schema.rb +15 -6
  50. data/spec/lib/config_spec.rb +29 -13
  51. data/spec/lib/models/scopes_spec.rb +32 -0
  52. data/spec/lib/oauth/access_token_request_spec.rb +15 -29
  53. data/spec/lib/oauth/authorization_request_spec.rb +22 -72
  54. data/spec/lib/oauth/client/credentials_spec.rb +47 -0
  55. data/spec/lib/oauth/client/methods_spec.rb +54 -0
  56. data/spec/lib/oauth/client_credentials/creator_spec.rb +47 -0
  57. data/spec/lib/oauth/client_credentials/issuer_spec.rb +57 -0
  58. data/spec/lib/oauth/client_credentials/response_spec.rb +58 -0
  59. data/spec/lib/oauth/client_credentials/validation_spec.rb +29 -0
  60. data/spec/lib/oauth/client_credentials_integration_spec.rb +27 -0
  61. data/spec/lib/oauth/client_credentials_request_spec.rb +60 -0
  62. data/spec/lib/oauth/client_spec.rb +42 -0
  63. data/spec/lib/oauth/error_response_spec.rb +40 -0
  64. data/spec/lib/oauth/error_spec.rb +19 -0
  65. data/spec/lib/oauth/helpers/scope_checker_spec.rb +15 -10
  66. data/spec/lib/oauth/password_access_token_request_spec.rb +152 -0
  67. data/spec/lib/oauth/scopes_spec.rb +115 -0
  68. data/spec/models/doorkeeper/access_grant_spec.rb +0 -15
  69. data/spec/models/doorkeeper/access_token_spec.rb +11 -4
  70. data/spec/requests/applications/authorized_applications_spec.rb +2 -2
  71. data/spec/requests/endpoints/authorization_spec.rb +2 -2
  72. data/spec/requests/endpoints/token_spec.rb +7 -0
  73. data/spec/requests/flows/authorization_code_errors_spec.rb +1 -1
  74. data/spec/requests/flows/authorization_code_spec.rb +8 -2
  75. data/spec/requests/flows/client_credentials_spec.rb +56 -0
  76. data/spec/requests/flows/password_spec.rb +52 -0
  77. data/spec/requests/flows/skip_authorization_spec.rb +2 -2
  78. data/spec/requests/protected_resources/private_api_spec.rb +9 -2
  79. data/spec/spec_helper_integration.rb +3 -0
  80. data/spec/support/helpers/authorization_request_helper.rb +7 -5
  81. data/spec/support/helpers/model_helper.rb +3 -3
  82. data/spec/support/helpers/request_spec_helper.rb +1 -1
  83. data/spec/support/helpers/url_helper.rb +12 -0
  84. metadata +65 -30
  85. data/lib/doorkeeper/config/scope.rb +0 -11
  86. data/lib/doorkeeper/config/scopes.rb +0 -61
  87. data/lib/doorkeeper/config/scopes_builder.rb +0 -18
  88. data/spec/dummy/config/initializers/inflections.rb +0 -10
  89. data/spec/dummy/config/initializers/mime_types.rb +0 -5
  90. data/spec/lib/config/scope_spec.rb +0 -45
  91. data/spec/lib/config/scopes_builder_spec.rb +0 -27
  92. data/spec/lib/config/scopes_spec.rb +0 -180
@@ -66,7 +66,7 @@ feature 'Authorization Code Flow Errors' do
66
66
 
67
67
  context 'with scopes' do
68
68
  background do
69
- scope_exists :write, :description => "Update your data"
69
+ optional_scopes_exist :write
70
70
  end
71
71
 
72
72
  scenario "redirects with :invalid_scope error when scope does not exists" do
@@ -75,8 +75,8 @@ feature 'Authorization Code Flow' do
75
75
 
76
76
  context 'with scopes' do
77
77
  background do
78
- scope_exists :public, :default => true, :description => "Access your public data"
79
- scope_exists :write, :description => "Update your data"
78
+ default_scopes_exist :public
79
+ optional_scopes_exist :write
80
80
  end
81
81
 
82
82
  scenario 'resource owner authorizes the client with default scopes' do
@@ -92,6 +92,12 @@ feature 'Authorization Code Flow' do
92
92
  access_grant_should_have_scopes :public, :write
93
93
  end
94
94
 
95
+ scenario 'resource owner authorizes the client with required scopes (without defaults)' do
96
+ visit authorization_endpoint_url(:client => @client, :scope => "write")
97
+ click_on "Authorize"
98
+ access_grant_should_have_scopes :write
99
+ end
100
+
95
101
  scenario 'new access token matches required scopes' do
96
102
  visit authorization_endpoint_url(:client => @client, :scope => "public write")
97
103
  click_on "Authorize"
@@ -0,0 +1,56 @@
1
+ require 'spec_helper_integration'
2
+
3
+ describe 'Client Credentials Request' do
4
+ let(:client) { FactoryGirl.create :application }
5
+
6
+ context 'a valid request' do
7
+ it 'authorizes the client and returns the token response' do
8
+ headers = authorization client.uid, client.secret
9
+ params = { :grant_type => 'client_credentials' }
10
+
11
+ post '/oauth/token', params, headers
12
+
13
+ should_have_json 'access_token', Doorkeeper::AccessToken.first.token
14
+ should_have_json 'expires_in', Doorkeeper.configuration.access_token_expires_in
15
+ should_have_json 'scope', ''
16
+
17
+ should_not_have_json 'error'
18
+ should_not_have_json 'error_description'
19
+ should_not_have_json 'refresh_token'
20
+ end
21
+
22
+ context 'with scopes' do
23
+ before do
24
+ optional_scopes_exist :write
25
+ end
26
+
27
+ it 'adds the scope to the token an returns in the response' do
28
+ headers = authorization client.uid, client.secret
29
+ params = { :grant_type => 'client_credentials', :scope => 'write' }
30
+
31
+ post '/oauth/token', params, headers
32
+
33
+ should_have_json 'access_token', Doorkeeper::AccessToken.first.token
34
+ should_have_json 'scope', 'write'
35
+ end
36
+ end
37
+ end
38
+
39
+ context 'an invalid request' do
40
+ it 'does not authorize the client and returns the error' do
41
+ headers = {}
42
+ params = { :grant_type => 'client_credentials' }
43
+
44
+ post '/oauth/token', params, headers
45
+
46
+ should_have_json 'error', 'invalid_client'
47
+ should_have_json 'error_description', translated_error_message(:invalid_client)
48
+ should_not_have_json 'access_token'
49
+ end
50
+ end
51
+
52
+ def authorization(username, password)
53
+ credentials = ActionController::HttpAuthentication::Basic.encode_credentials username, password
54
+ { 'HTTP_AUTHORIZATION' => credentials }
55
+ end
56
+ end
@@ -0,0 +1,52 @@
1
+ # coding: utf-8
2
+
3
+ # TODO: this flow should be configurable (letting Doorkeeper users decide if
4
+ # they want to make it available)
5
+
6
+ require 'spec_helper_integration'
7
+
8
+ feature 'Resource Owner Password Credentials Flow' do
9
+ background do
10
+ config_is_set(:resource_owner_from_credentials) { User.authenticate! params[:username], params[:password] }
11
+ client_exists
12
+ create_resource_owner
13
+ end
14
+
15
+ context 'with valid user credentials' do
16
+ scenario "should issue new token" do
17
+ expect {
18
+ post password_token_endpoint_url(:client => @client, :resource_owner => @resource_owner)
19
+ }.to change { Doorkeeper::AccessToken.count }.by(1)
20
+
21
+ token = Doorkeeper::AccessToken.first
22
+
23
+ should_have_json 'access_token', token.token
24
+ end
25
+
26
+ scenario "should issue a refresh token if enabled" do
27
+ config_is_set(:refresh_token_enabled, true)
28
+
29
+ post password_token_endpoint_url(:client => @client, :resource_owner => @resource_owner)
30
+
31
+ token = Doorkeeper::AccessToken.first
32
+
33
+ should_have_json 'refresh_token', token.refresh_token
34
+ end
35
+ end
36
+
37
+ context "with invalid user credentials" do
38
+ scenario "should not issue new token with bad password" do
39
+ expect {
40
+ post password_token_endpoint_url( :client => @client,
41
+ :resource_owner_username => @resource_owner.name,
42
+ :resource_owner_password => 'wrongpassword')
43
+ }.to_not change { Doorkeeper::AccessToken.count }
44
+ end
45
+
46
+ scenario "should not issue new token without credentials" do
47
+ expect {
48
+ post password_token_endpoint_url( :client => @client)
49
+ }.to_not change { Doorkeeper::AccessToken.count }
50
+ end
51
+ end
52
+ end
@@ -4,8 +4,8 @@ feature 'Skip authorization form' do
4
4
  background do
5
5
  config_is_set(:authenticate_resource_owner) { User.first || redirect_to('/sign_in') }
6
6
  client_exists
7
- scope_exists :public, :default => true, :description => "Access your public data"
8
- scope_exists :write, :description => "Update your data"
7
+ default_scopes_exist :public
8
+ optional_scopes_exist :write
9
9
  end
10
10
 
11
11
  context 'for previously authorized clients' do
@@ -3,7 +3,7 @@ require 'spec_helper_integration'
3
3
  feature 'Private API' do
4
4
  background do
5
5
  @client = FactoryGirl.create(:application)
6
- @resource = User.create!
6
+ @resource = User.create!(:name => "Joe", :password => "sekret")
7
7
  @token = client_is_authorized(@client, @resource)
8
8
  end
9
9
 
@@ -26,8 +26,15 @@ feature 'Private API' do
26
26
  response_status_should_be 401
27
27
  end
28
28
 
29
+ scenario 'client requests protected resource with permanent token' do
30
+ @token.update_attribute :expires_in, nil # never expires
31
+ with_access_token_header @token.token
32
+ visit '/full_protected_resources'
33
+ page.body.should have_content("index")
34
+ end
35
+
29
36
  scenario 'access token with no scopes' do
30
- scope_exists :admin, :description => "admin"
37
+ optional_scopes_exist :admin
31
38
  @token.update_attribute :scopes, nil
32
39
  with_access_token_header @token.token
33
40
  visit '/full_protected_resources/1.json'
@@ -8,6 +8,9 @@ require 'timecop'
8
8
 
9
9
  ENGINE_RAILS_ROOT = File.join(File.dirname(__FILE__), '../')
10
10
 
11
+ puts "====> Rails version: #{Rails.version}"
12
+ puts "====> Ruby version: #{RUBY_VERSION}"
13
+
11
14
  # load schema to in memory sqlite
12
15
  ActiveRecord::Migration.verbose = false
13
16
  load Rails.root + "db/schema.rb"
@@ -1,6 +1,6 @@
1
1
  module AuthorizationRequestHelper
2
2
  def resource_owner_is_authenticated(resource_owner = nil)
3
- resource_owner ||= User.create!
3
+ resource_owner ||= User.create!(:name => "Joe", :password => "sekret")
4
4
  Doorkeeper.configuration.instance_variable_set(:@authenticate_resource_owner, proc { resource_owner })
5
5
  end
6
6
 
@@ -8,10 +8,12 @@ module AuthorizationRequestHelper
8
8
  Doorkeeper.configuration.instance_variable_set(:@authenticate_resource_owner, proc { redirect_to("/sign_in") })
9
9
  end
10
10
 
11
- def scope_exists(*args)
12
- scopes = Doorkeeper.configuration.instance_variable_get(:@scopes) || Doorkeeper::Scopes.new
13
- scopes.add(Doorkeeper::Scope.new(*args))
14
- Doorkeeper.configuration.instance_variable_set(:@scopes, scopes)
11
+ def default_scopes_exist(*scopes)
12
+ Doorkeeper.configuration.instance_variable_set(:@default_scopes, Doorkeeper::OAuth::Scopes.from_array(scopes))
13
+ end
14
+
15
+ def optional_scopes_exist(*scopes)
16
+ Doorkeeper.configuration.instance_variable_set(:@optional_scopes, Doorkeeper::OAuth::Scopes.from_array(scopes))
15
17
  end
16
18
 
17
19
  def client_should_be_authorized(client)
@@ -4,7 +4,7 @@ module ModelHelper
4
4
  end
5
5
 
6
6
  def create_resource_owner
7
- @resource_owner = User.create!
7
+ @resource_owner = User.create!(:name => "Joe", :password => "sekret")
8
8
  end
9
9
 
10
10
  def authorization_code_exists(options = {})
@@ -33,12 +33,12 @@ module ModelHelper
33
33
 
34
34
  def access_grant_should_have_scopes(*args)
35
35
  grant = Doorkeeper::AccessGrant.first
36
- grant.scopes.should == args
36
+ grant.scopes.should == Doorkeeper::OAuth::Scopes.from_array(args)
37
37
  end
38
38
 
39
39
  def access_token_should_have_scopes(*args)
40
40
  grant = Doorkeeper::AccessToken.first
41
- grant.scopes.should == args
41
+ grant.scopes.should == Doorkeeper::OAuth::Scopes.from_array(args)
42
42
  end
43
43
  end
44
44
 
@@ -40,7 +40,7 @@ module RequestSpecHelper
40
40
  end
41
41
 
42
42
  def basic_auth_header_for_client(client)
43
- "Basic #{Base64.encode64("#{client.uid}:#{client.secret}")}"
43
+ ActionController::HttpAuthentication::Basic.encode_credentials client.uid, client.secret
44
44
  end
45
45
 
46
46
  def should_have_json(key, value)
@@ -10,6 +10,18 @@ module UrlHelper
10
10
  "/oauth/token?#{build_query(parameters)}"
11
11
  end
12
12
 
13
+ def password_token_endpoint_url(options = {})
14
+ parameters = {
15
+ :code => options[:code],
16
+ :client_id => options[:client_id] || (options[:client] ? options[:client].uid : nil),
17
+ :client_secret => options[:client_secret] || (options[:client] ? options[:client].secret : nil),
18
+ :username => options[:resource_owner_username] || (options[:resource_owner] ? options[:resource_owner].name : nil),
19
+ :password => options[:resource_owner_password] || (options[:resource_owner] ? options[:resource_owner].password : nil),
20
+ :grant_type => "password",
21
+ }
22
+ "/oauth/token?#{build_query(parameters)}"
23
+ end
24
+
13
25
  def authorization_endpoint_url(options = {})
14
26
  parameters = {
15
27
  :client_id => options[:client_id] || options[:client].uid,
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.3.4
4
+ version: 0.4.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: 2012-05-24 00:00:00.000000000 Z
13
+ date: 2012-05-26 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: railties
17
- requirement: &70167361790320 !ruby/object:Gem::Requirement
17
+ requirement: &70213938588360 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ~>
@@ -22,10 +22,10 @@ dependencies:
22
22
  version: '3.1'
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *70167361790320
25
+ version_requirements: *70213938588360
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: sqlite3
28
- requirement: &70167361788260 !ruby/object:Gem::Requirement
28
+ requirement: &70213938586440 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ~>
@@ -33,21 +33,21 @@ dependencies:
33
33
  version: 1.3.5
34
34
  type: :development
35
35
  prerelease: false
36
- version_requirements: *70167361788260
36
+ version_requirements: *70213938586440
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: rspec-rails
39
- requirement: &70167361803480 !ruby/object:Gem::Requirement
39
+ requirement: &70213938584520 !ruby/object:Gem::Requirement
40
40
  none: false
41
41
  requirements:
42
42
  - - ~>
43
43
  - !ruby/object:Gem::Version
44
- version: 2.9.0
44
+ version: 2.10.0
45
45
  type: :development
46
46
  prerelease: false
47
- version_requirements: *70167361803480
47
+ version_requirements: *70213938584520
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: capybara
50
- requirement: &70167361802300 !ruby/object:Gem::Requirement
50
+ requirement: &70213938582960 !ruby/object:Gem::Requirement
51
51
  none: false
52
52
  requirements:
53
53
  - - ~>
@@ -55,10 +55,10 @@ dependencies:
55
55
  version: 1.1.2
56
56
  type: :development
57
57
  prerelease: false
58
- version_requirements: *70167361802300
58
+ version_requirements: *70213938582960
59
59
  - !ruby/object:Gem::Dependency
60
60
  name: generator_spec
61
- requirement: &70167361800940 !ruby/object:Gem::Requirement
61
+ requirement: &70213938582320 !ruby/object:Gem::Requirement
62
62
  none: false
63
63
  requirements:
64
64
  - - ~>
@@ -66,10 +66,10 @@ dependencies:
66
66
  version: 0.8.5
67
67
  type: :development
68
68
  prerelease: false
69
- version_requirements: *70167361800940
69
+ version_requirements: *70213938582320
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: factory_girl
72
- requirement: &70167361799900 !ruby/object:Gem::Requirement
72
+ requirement: &70213938597380 !ruby/object:Gem::Requirement
73
73
  none: false
74
74
  requirements:
75
75
  - - ~>
@@ -77,10 +77,10 @@ dependencies:
77
77
  version: 2.6.4
78
78
  type: :development
79
79
  prerelease: false
80
- version_requirements: *70167361799900
80
+ version_requirements: *70213938597380
81
81
  - !ruby/object:Gem::Dependency
82
82
  name: timecop
83
- requirement: &70167361799080 !ruby/object:Gem::Requirement
83
+ requirement: &70213938595120 !ruby/object:Gem::Requirement
84
84
  none: false
85
85
  requirements:
86
86
  - - ~>
@@ -88,10 +88,10 @@ dependencies:
88
88
  version: 0.3.5
89
89
  type: :development
90
90
  prerelease: false
91
- version_requirements: *70167361799080
91
+ version_requirements: *70213938595120
92
92
  - !ruby/object:Gem::Dependency
93
93
  name: database_cleaner
94
- requirement: &70167361798020 !ruby/object:Gem::Requirement
94
+ requirement: &70213938592720 !ruby/object:Gem::Requirement
95
95
  none: false
96
96
  requirements:
97
97
  - - ~>
@@ -99,7 +99,18 @@ dependencies:
99
99
  version: 0.7.1
100
100
  type: :development
101
101
  prerelease: false
102
- version_requirements: *70167361798020
102
+ version_requirements: *70213938592720
103
+ - !ruby/object:Gem::Dependency
104
+ name: bcrypt-ruby
105
+ requirement: &70213938591020 !ruby/object:Gem::Requirement
106
+ none: false
107
+ requirements:
108
+ - - ~>
109
+ - !ruby/object:Gem::Version
110
+ version: 3.0.1
111
+ type: :development
112
+ prerelease: false
113
+ version_requirements: *70213938591020
103
114
  description: Doorkeeper is an OAuth 2 provider for Rails.
104
115
  email:
105
116
  - felipe@applicake.com
@@ -145,22 +156,32 @@ files:
145
156
  - gemfiles/gemfile.rails-3.2.x
146
157
  - lib/doorkeeper.rb
147
158
  - lib/doorkeeper/config.rb
148
- - lib/doorkeeper/config/scope.rb
149
- - lib/doorkeeper/config/scopes.rb
150
- - lib/doorkeeper/config/scopes_builder.rb
151
159
  - lib/doorkeeper/doorkeeper_for.rb
152
160
  - lib/doorkeeper/engine.rb
153
161
  - lib/doorkeeper/models/expirable.rb
154
162
  - lib/doorkeeper/models/revocable.rb
163
+ - lib/doorkeeper/models/scopes.rb
155
164
  - lib/doorkeeper/oauth/access_token_request.rb
156
165
  - lib/doorkeeper/oauth/authorization.rb
157
166
  - lib/doorkeeper/oauth/authorization/code.rb
158
167
  - lib/doorkeeper/oauth/authorization/token.rb
159
168
  - lib/doorkeeper/oauth/authorization/uri_builder.rb
160
169
  - lib/doorkeeper/oauth/authorization_request.rb
170
+ - lib/doorkeeper/oauth/client.rb
171
+ - lib/doorkeeper/oauth/client/credentials.rb
172
+ - lib/doorkeeper/oauth/client/methods.rb
173
+ - lib/doorkeeper/oauth/client_credentials/creator.rb
174
+ - lib/doorkeeper/oauth/client_credentials/issuer.rb
175
+ - lib/doorkeeper/oauth/client_credentials/response.rb
176
+ - lib/doorkeeper/oauth/client_credentials/validation.rb
177
+ - lib/doorkeeper/oauth/client_credentials_request.rb
178
+ - lib/doorkeeper/oauth/error.rb
179
+ - lib/doorkeeper/oauth/error_response.rb
161
180
  - lib/doorkeeper/oauth/helpers/scope_checker.rb
162
181
  - lib/doorkeeper/oauth/helpers/unique_token.rb
163
182
  - lib/doorkeeper/oauth/helpers/uri_checker.rb
183
+ - lib/doorkeeper/oauth/password_access_token_request.rb
184
+ - lib/doorkeeper/oauth/scopes.rb
164
185
  - lib/doorkeeper/validations.rb
165
186
  - lib/doorkeeper/version.rb
166
187
  - lib/generators/doorkeeper/install_generator.rb
@@ -170,6 +191,7 @@ files:
170
191
  - lib/generators/doorkeeper/views_generator.rb
171
192
  - lib/tasks/doorkeeper_tasks.rake
172
193
  - script/rails
194
+ - script/run_all
173
195
  - spec/controllers/applications_controller_spec.rb
174
196
  - spec/controllers/authorizations_controller_spec.rb
175
197
  - spec/controllers/protected_resources_controller_spec.rb
@@ -195,14 +217,14 @@ files:
195
217
  - spec/dummy/config/environments/test.rb
196
218
  - spec/dummy/config/initializers/backtrace_silencers.rb
197
219
  - spec/dummy/config/initializers/doorkeeper.rb
198
- - spec/dummy/config/initializers/inflections.rb
199
- - spec/dummy/config/initializers/mime_types.rb
200
220
  - spec/dummy/config/initializers/secret_token.rb
201
221
  - spec/dummy/config/initializers/session_store.rb
202
222
  - spec/dummy/config/initializers/wrap_parameters.rb
223
+ - spec/dummy/config/locales/doorkeeper.en.yml
203
224
  - spec/dummy/config/routes.rb
204
225
  - spec/dummy/db/migrate/20111122132257_create_users.rb
205
- - spec/dummy/db/migrate/20111206151426_create_doorkeeper_tables.rb
226
+ - spec/dummy/db/migrate/20120312140401_add_password_to_users.rb
227
+ - spec/dummy/db/migrate/20120524202412_create_doorkeeper_tables.rb
206
228
  - spec/dummy/db/schema.rb
207
229
  - spec/dummy/public/404.html
208
230
  - spec/dummy/public/422.html
@@ -215,18 +237,29 @@ files:
215
237
  - spec/generators/install_generator_spec.rb
216
238
  - spec/generators/templates/routes.rb
217
239
  - spec/generators/views_generator_spec.rb
218
- - spec/lib/config/scope_spec.rb
219
- - spec/lib/config/scopes_builder_spec.rb
220
- - spec/lib/config/scopes_spec.rb
221
240
  - spec/lib/config_spec.rb
222
241
  - spec/lib/models/expirable_spec.rb
223
242
  - spec/lib/models/revocable_spec.rb
243
+ - spec/lib/models/scopes_spec.rb
224
244
  - spec/lib/oauth/access_token_request_spec.rb
225
245
  - spec/lib/oauth/authorization/uri_builder_spec.rb
226
246
  - spec/lib/oauth/authorization_request_spec.rb
247
+ - spec/lib/oauth/client/credentials_spec.rb
248
+ - spec/lib/oauth/client/methods_spec.rb
249
+ - spec/lib/oauth/client_credentials/creator_spec.rb
250
+ - spec/lib/oauth/client_credentials/issuer_spec.rb
251
+ - spec/lib/oauth/client_credentials/response_spec.rb
252
+ - spec/lib/oauth/client_credentials/validation_spec.rb
253
+ - spec/lib/oauth/client_credentials_integration_spec.rb
254
+ - spec/lib/oauth/client_credentials_request_spec.rb
255
+ - spec/lib/oauth/client_spec.rb
256
+ - spec/lib/oauth/error_response_spec.rb
257
+ - spec/lib/oauth/error_spec.rb
227
258
  - spec/lib/oauth/helpers/scope_checker_spec.rb
228
259
  - spec/lib/oauth/helpers/unique_token_spec.rb
229
260
  - spec/lib/oauth/helpers/uri_checker_spec.rb
261
+ - spec/lib/oauth/password_access_token_request_spec.rb
262
+ - spec/lib/oauth/scopes_spec.rb
230
263
  - spec/models/doorkeeper/access_grant_spec.rb
231
264
  - spec/models/doorkeeper/access_token_spec.rb
232
265
  - spec/models/doorkeeper/application_spec.rb
@@ -236,8 +269,10 @@ files:
236
269
  - spec/requests/endpoints/token_spec.rb
237
270
  - spec/requests/flows/authorization_code_errors_spec.rb
238
271
  - spec/requests/flows/authorization_code_spec.rb
272
+ - spec/requests/flows/client_credentials_spec.rb
239
273
  - spec/requests/flows/implicit_grant_errors_spec.rb
240
274
  - spec/requests/flows/implicit_grant_spec.rb
275
+ - spec/requests/flows/password_spec.rb
241
276
  - spec/requests/flows/refresh_token_spec.rb
242
277
  - spec/requests/flows/skip_authorization_spec.rb
243
278
  - spec/requests/protected_resources/private_api_spec.rb
@@ -267,7 +302,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
267
302
  version: '0'
268
303
  segments:
269
304
  - 0
270
- hash: 1917524084818713138
305
+ hash: -318783597431461187
271
306
  required_rubygems_version: !ruby/object:Gem::Requirement
272
307
  none: false
273
308
  requirements:
@@ -276,7 +311,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
276
311
  version: '0'
277
312
  segments:
278
313
  - 0
279
- hash: 1917524084818713138
314
+ hash: -318783597431461187
280
315
  requirements: []
281
316
  rubyforge_project:
282
317
  rubygems_version: 1.8.12