doorkeeper 2.1.4 → 2.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +1 -430
- data/Gemfile +1 -8
- data/NEWS.md +449 -0
- data/README.md +46 -3
- data/doorkeeper.gemspec +1 -1
- data/gemfiles/Gemfile.common.rb +0 -7
- data/gemfiles/Gemfile.mongo_mapper.rb +2 -2
- data/gemfiles/Gemfile.mongoid2.rb +1 -1
- data/gemfiles/Gemfile.mongoid4.rb +0 -1
- data/lib/doorkeeper/config.rb +7 -0
- data/lib/doorkeeper/engine.rb +4 -0
- data/lib/doorkeeper/errors.rb +6 -0
- data/lib/doorkeeper/models/access_token_mixin.rb +6 -1
- data/lib/doorkeeper/rails/helpers.rb +1 -1
- data/lib/doorkeeper/version.rb +1 -1
- data/lib/generators/doorkeeper/templates/initializer.rb +4 -0
- data/spec/controllers/applications_controller_spec.rb +0 -1
- data/spec/controllers/token_info_controller_spec.rb +0 -4
- data/spec/controllers/tokens_controller_spec.rb +4 -3
- data/spec/dummy/config/application.rb +2 -0
- data/spec/lib/config_spec.rb +18 -2
- data/spec/lib/oauth/authorization_code_request_spec.rb +1 -1
- data/spec/lib/oauth/client/credentials_spec.rb +2 -2
- data/spec/lib/oauth/password_access_token_request_spec.rb +1 -1
- data/spec/lib/oauth/pre_authorization_spec.rb +9 -10
- data/spec/lib/oauth/refresh_token_request_spec.rb +0 -1
- data/spec/lib/oauth/token_request_spec.rb +3 -3
- data/spec/lib/server_spec.rb +3 -1
- data/spec/models/doorkeeper/access_token_spec.rb +48 -0
- data/spec/requests/applications/applications_request_spec.rb +1 -1
- data/spec/requests/endpoints/authorization_spec.rb +2 -1
- data/spec/requests/endpoints/token_spec.rb +9 -9
- data/spec/requests/flows/authorization_code_errors_spec.rb +4 -4
- data/spec/requests/flows/authorization_code_spec.rb +10 -2
- data/spec/requests/flows/implicit_grant_spec.rb +14 -5
- data/spec/requests/flows/password_spec.rb +14 -20
- data/spec/requests/flows/refresh_token_spec.rb +7 -7
- data/spec/requests/flows/revoke_token_spec.rb +9 -31
- data/spec/requests/protected_resources/metal_spec.rb +3 -3
- data/spec/requests/protected_resources/private_api_spec.rb +11 -0
- data/spec/routing/custom_controller_routes_spec.rb +1 -2
- data/spec/routing/default_routes_spec.rb +1 -2
- data/spec/routing/scoped_routes_spec.rb +0 -1
- data/spec/spec_helper_integration.rb +3 -1
- data/spec/support/helpers/access_token_request_helper.rb +1 -1
- data/spec/support/helpers/authorization_request_helper.rb +1 -1
- data/spec/support/helpers/config_helper.rb +1 -1
- data/spec/support/helpers/model_helper.rb +1 -1
- data/spec/support/helpers/request_spec_helper.rb +1 -1
- data/spec/support/helpers/url_helper.rb +1 -1
- metadata +5 -4
data/NEWS.md
ADDED
@@ -0,0 +1,449 @@
|
|
1
|
+
# News
|
2
|
+
|
3
|
+
User-visible changes worth mentioning.
|
4
|
+
|
5
|
+
---
|
6
|
+
|
7
|
+
## 2.2.0 - 2015-04-19
|
8
|
+
|
9
|
+
- [#611] Allow custom access token generators to be used
|
10
|
+
- [#632] Properly fallback to `default_scopes` when no scope is specified
|
11
|
+
- [#622] Clarify that there is a logical OR between scopes for authorizing
|
12
|
+
- [#635] Upgrade to rspec 3
|
13
|
+
- [#627] i18n fallbacks to english
|
14
|
+
- Moved CHANGELOG to NEWS.md
|
15
|
+
|
16
|
+
|
17
|
+
## 2.1.4 - 2015-03-27
|
18
|
+
|
19
|
+
- [#595] HTTP spec: Add `scope` for refresh token scope param
|
20
|
+
- [#596] Limit scopes in app scopes for client credentials
|
21
|
+
- [#567] Add Grape helpers for easier integration with Grape framework
|
22
|
+
- [#606] Add custom access token expiration support for Client Credentials flow
|
23
|
+
|
24
|
+
|
25
|
+
## 2.1.3 - 2015-03-01
|
26
|
+
|
27
|
+
- [#588] Fixes scopes_match? bug that skipped authorization form in some cases
|
28
|
+
|
29
|
+
|
30
|
+
## 2.1.2 - 2015-02-25
|
31
|
+
|
32
|
+
- [#574] Remove unused update authorization route.
|
33
|
+
- [#576] Filter out sensitive parameters from logs.
|
34
|
+
- [#582] The Authorization HTTP header fields are now case insensitive.
|
35
|
+
- [#583] Database connection bugfix in certain scenarios.
|
36
|
+
- Testing improvements
|
37
|
+
|
38
|
+
|
39
|
+
## 2.1.1 - 2015-02-06
|
40
|
+
|
41
|
+
- Remove `wildcard_redirect_url` option
|
42
|
+
- [#481] Customize token flow OAuth expirations with a config lambda
|
43
|
+
- [#568] TokensController: Memoize strategy.authorize_response result to enable
|
44
|
+
subclasses to use the response object.
|
45
|
+
- [#571] Fix database initialization issues in some configurations.
|
46
|
+
- Documentation improvements
|
47
|
+
|
48
|
+
|
49
|
+
## 2.1.0 - 2015-01-13
|
50
|
+
|
51
|
+
- [#540] Include `created_at` in response.
|
52
|
+
- [#538] Check application-level scopes in client_credentials and password flow.
|
53
|
+
- [5596227] Check application scopes in AccessToken when present. Fixes a bug in
|
54
|
+
doorkeeper 2.0.0 and 2.0.1 referring to application specific scopes.
|
55
|
+
- [#534] Internationalizes doorkeeper views.
|
56
|
+
- [#545] Ensure there is a connection to the database before checking for
|
57
|
+
missing columns
|
58
|
+
- [#546] Use `Doorkeeper::` prefix when referencing `Application` to avoid
|
59
|
+
possible application model name conflict.
|
60
|
+
- [#538] Test with Rails ~> 4.2.
|
61
|
+
|
62
|
+
### Potentially backward incompatible changes
|
63
|
+
|
64
|
+
- Enable by default `authorization_code` and `client_credentials` grant flows.
|
65
|
+
Disables implicit and password grant flows by default.
|
66
|
+
- [#510, #544, 722113f] Revoked refresh token response bugfix.
|
67
|
+
|
68
|
+
|
69
|
+
## 2.0.1 - 2014-12-17
|
70
|
+
|
71
|
+
- [#525, #526, #527] Fix `ActiveRecord::NoDatabaseError` on gem load.
|
72
|
+
|
73
|
+
|
74
|
+
## 2.0.0 - 2014-12-16
|
75
|
+
|
76
|
+
### Backward incompatible changes
|
77
|
+
|
78
|
+
- [#448] Removes `doorkeeper_for` helper. Now we use
|
79
|
+
`before_action :doorkeeper_authorize!`.
|
80
|
+
- [#469] Allow client applications to restrict the set of allowable scopes.
|
81
|
+
Fixes #317. `oauth_applications` relation needs a new `scopes` string column,
|
82
|
+
non nullable, which defaults to an empty string. To add the column run:
|
83
|
+
|
84
|
+
```
|
85
|
+
rails generate doorkeeper:application_scopes
|
86
|
+
```
|
87
|
+
|
88
|
+
If you’d rather do it by hand, your ActiveRecord migration should contain:
|
89
|
+
|
90
|
+
```ruby
|
91
|
+
add_column :oauth_applications, :scopes, :string, null: false, default: ‘’
|
92
|
+
```
|
93
|
+
|
94
|
+
### Removed deprecations
|
95
|
+
|
96
|
+
- Removes `test_redirect_uri` option. It is now called `native_redirect_uri`.
|
97
|
+
- [#446] Removes `mount Doorkeeper::Engine`. Now we use `use_doorkeeper`.
|
98
|
+
|
99
|
+
### Others
|
100
|
+
|
101
|
+
- [#484] Performance improvement - avoid performing order_by when not required.
|
102
|
+
- [#450] When password is invalid in Password Credentials Grant, Doorkeeper
|
103
|
+
returned 'invalid_resource_owner' instead of 'invalid_grant', as the spec
|
104
|
+
declares. Fixes #444.
|
105
|
+
- [#452] Allows `revoked_at` to be set in the future, for future expiry.
|
106
|
+
Rationale: https://github.com/doorkeeper-gem/doorkeeper/pull/452#issuecomment-51431459
|
107
|
+
- [#480] For Implicit grant flow, access tokens can now be reused. Fixes #421.
|
108
|
+
- [#491] Reworks of @jasl's #454 and #478. ORM refactor that allows doorkeeper
|
109
|
+
to be extended more easily with unsupported ORMs. It also marks the boundaries
|
110
|
+
between shared model code and ORM specifics inside of the gem.
|
111
|
+
- [#496] Tests with Rails 4.2.
|
112
|
+
- [#489] Adds `force_ssl_in_redirect_uri` to force the usage of the HTTPS
|
113
|
+
protocol in non-native redirect uris.
|
114
|
+
- [#516] SECURITY: Adds `protect_from_forgery` to `Doorkeeper::ApplicationController`
|
115
|
+
- [#518] Fix random failures in mongodb.
|
116
|
+
|
117
|
+
---
|
118
|
+
|
119
|
+
## 1.4.2 - 2015-03-02
|
120
|
+
|
121
|
+
- [#576] Filter out sensitive parameters from logs
|
122
|
+
|
123
|
+
## 1.4.1 - 2014-12-17
|
124
|
+
|
125
|
+
- [#516] SECURITY: Adds `protect_from_forgery` to `Doorkeeper::ApplicationController`
|
126
|
+
|
127
|
+
## 1.4.0 - 2014-07-31
|
128
|
+
|
129
|
+
- internals
|
130
|
+
- [#427] Adds specs expectations.
|
131
|
+
- [#428] Error response refactor.
|
132
|
+
- [#417] Moves token validation into Access Token class.
|
133
|
+
- [#439] Removes redundant module includes.
|
134
|
+
- [#443] TokensController and TokenInfoController inherit from ActionController::Metal
|
135
|
+
- bug
|
136
|
+
- [#418] fixes #243, requests with insufficient scope now respond 403 instead
|
137
|
+
of 401. (API change)
|
138
|
+
- [#438] fixes #398, native redirect for implicit token grant bug.
|
139
|
+
- [#440] namespace fixes
|
140
|
+
- enhancements
|
141
|
+
- [#432] Keeps query parameters
|
142
|
+
|
143
|
+
## 1.3.1 - 2014-07-06
|
144
|
+
|
145
|
+
- enhancements
|
146
|
+
- [#405] Adds facade to more easily get the token from a request in a route
|
147
|
+
constraint.
|
148
|
+
- [#415] Extend Doorkeeper TokenResponse with an `after_successful_response`
|
149
|
+
callback that allows handling of `response` object.
|
150
|
+
- internals
|
151
|
+
- [#409] Deprecates `test_redirect_uri` in favor of `native_redirect_uri`.
|
152
|
+
See discussion in: [#351].
|
153
|
+
- [#411] Clean rspec deprecations. General test improvements.
|
154
|
+
- [#412] rspec line width can go longer than 80 (hound CI config).
|
155
|
+
- bug
|
156
|
+
- [#413] fixes #340, routing scope is now taken into account in redirect.
|
157
|
+
- [#401] and [#425] application is not required any longer for access_token.
|
158
|
+
|
159
|
+
## 1.3.0 - 2014-05-23
|
160
|
+
|
161
|
+
- enhancements
|
162
|
+
- [#387] Adds reuse_access_token configuration option.
|
163
|
+
|
164
|
+
## 1.2.0 - 2014-05-02
|
165
|
+
|
166
|
+
- enhancements
|
167
|
+
- [#376] Allow users to enable basic header authorization for access tokens.
|
168
|
+
- [#374] Token revocation implementation [RFC 7009]
|
169
|
+
- [#295] Only enable specific grant flows.
|
170
|
+
- internals
|
171
|
+
- [#381] Locale source fix.
|
172
|
+
- [#380] Renames `errors_for` to `doorkeeper_errors_for`.
|
173
|
+
- [#390] Style adjustments in accordance with Ruby Style Guide form
|
174
|
+
Thoughtbot.
|
175
|
+
|
176
|
+
## 1.1.0 - 2014-03-29
|
177
|
+
|
178
|
+
- enhancements
|
179
|
+
- [#336] mongoid4 support.
|
180
|
+
- [#372] Allow users to set ActiveRecord table_name_prefix/suffix options
|
181
|
+
- internals
|
182
|
+
- [#343] separate OAuth's admin and user end-point to different layouts, upgrade theme to Bootstrap 3.1.
|
183
|
+
- [#348] Move render_options in filter after `@error` has been set
|
184
|
+
|
185
|
+
## 1.0.0 - 2014-01-13
|
186
|
+
|
187
|
+
- bug (spec)
|
188
|
+
- [#228] token response `expires_in` value is now in seconds, relative to
|
189
|
+
request time
|
190
|
+
- [#296] client is optional for password grant type.
|
191
|
+
- [#319] If client credentials are present on password grant type they are validated
|
192
|
+
- [#326] If client credentials are present in refresh token they are validated
|
193
|
+
- [#326] If authenticated client does not match original client that
|
194
|
+
obtained a refresh token it responds `invalid_grant` instead of
|
195
|
+
`invalid_client`. Previous usage was invalid according to Section 5.2 of
|
196
|
+
the spec.
|
197
|
+
- [#329] access tokens' `scopes` string wa being compared against
|
198
|
+
`default_scopes` symbols, always unauthorizing.
|
199
|
+
- [#318] Include "WWW-Authenticate" header with Unauthorized responses
|
200
|
+
- enhancements
|
201
|
+
- [#293] Adds ActionController::Instrumentation in TokensController
|
202
|
+
- [#298] Support for multiple redirect_uris added.
|
203
|
+
- [#313] `AccessToken.revoke_all_for` actually revokes all non-revoked
|
204
|
+
tokens for an application/owner instead of deleting them.
|
205
|
+
- [#333] Rails 4.1 support
|
206
|
+
- internals
|
207
|
+
- Removes jQuery dependency [fixes #300] [PR #312 is related]
|
208
|
+
- [#294] Client uid and secret will be generated only if not present.
|
209
|
+
- [#316] Test warnings addressed.
|
210
|
+
- [#338] Rspec 3 syntax.
|
211
|
+
|
212
|
+
---
|
213
|
+
|
214
|
+
## 0.7.4 - 2013-12-01
|
215
|
+
|
216
|
+
- bug
|
217
|
+
- Symbols instead of strings for user input.
|
218
|
+
|
219
|
+
## 0.7.3 - 2013-10-04
|
220
|
+
|
221
|
+
- enhancements
|
222
|
+
- [#204] Allow to overwrite scope in routes
|
223
|
+
- internals
|
224
|
+
- Returns only present keys in Token Response (may imply a backwards
|
225
|
+
incompatible change). https://github.com/doorkeeper-gem/doorkeeper/issues/220
|
226
|
+
- bug
|
227
|
+
- [#290] Support for Rails 4 when 'protected_attributes' gem is present.
|
228
|
+
|
229
|
+
## 0.7.2 - 2013-09-11
|
230
|
+
|
231
|
+
- enhancements
|
232
|
+
- [#272] Allow issuing multiple access_tokens for one user/application for multiple devices
|
233
|
+
- [#170] Increase length of allowed redirect URIs
|
234
|
+
- [#239] Do not try to load unavailable Request class for the current phase.
|
235
|
+
- [#273] Relax jquery-rails gem dependency
|
236
|
+
|
237
|
+
## 0.7.1 - 2013-08-30
|
238
|
+
|
239
|
+
- bug
|
240
|
+
- [#269] Rails 3.2 raised `ActiveModel::MassAssignmentSecurity::Error`.
|
241
|
+
|
242
|
+
## 0.7.0 - 2013-08-21
|
243
|
+
|
244
|
+
- enhancements
|
245
|
+
- [#229] Rails 4!
|
246
|
+
- internals
|
247
|
+
- [#203] Changing table name to be specific in column_names_with_table
|
248
|
+
- [#215] README update
|
249
|
+
- [#227] Use Rails.config.paths["config/routes"] instead of assuming "config/routes.rb" exists
|
250
|
+
- [#262] Add jquery as gem dependency
|
251
|
+
- [#263] Add a configuration for ActiveRecord.establish_connection
|
252
|
+
- Deprecation and Ruby warnings (PRs merged outside of GitHub).
|
253
|
+
|
254
|
+
## 0.6.7 - 2013-01-13
|
255
|
+
|
256
|
+
- internals
|
257
|
+
- [#188] Add IDs to the show views for integration testing [@egtann](https://github.com/egtann)
|
258
|
+
|
259
|
+
## 0.6.6 - 2013-01-04
|
260
|
+
|
261
|
+
- enhancements
|
262
|
+
- [#187] Raise error if configuration is not set
|
263
|
+
|
264
|
+
## 0.6.5 - 2012-12-26
|
265
|
+
|
266
|
+
- enhancements
|
267
|
+
- [#184] Vendor the Bootstrap CSS [@tylerhunt](https://github.com/tylerhunt)
|
268
|
+
|
269
|
+
## 0.6.4 - 2012-12-15
|
270
|
+
|
271
|
+
- bug
|
272
|
+
- [#180] Add localization to authorized_applications destroy notice [@aalvarado](https://github.com/aalvarado)
|
273
|
+
|
274
|
+
## 0.6.3 - 2012-12-07
|
275
|
+
|
276
|
+
- bugfixes
|
277
|
+
- [#163] Error response content-type header should be application/json [@ggayan](https://github.com/ggayan)
|
278
|
+
- [#175] Make token.expires_in_seconds return nil when expires_in is nil [@miyagawa](https://github.com/miyagawa)
|
279
|
+
- enhancements
|
280
|
+
- [#166, #172, #174] Behavior to automatically authorize based on a configured proc
|
281
|
+
- internals
|
282
|
+
- [#168] Using expectation syntax for controller specs [@rdsoze](https://github.com/rdsoze)
|
283
|
+
|
284
|
+
## 0.6.2 - 2012-11-10
|
285
|
+
|
286
|
+
- bugfixes
|
287
|
+
- [#162] Remove ownership columns from base migration template [@rdsoze](https://github.com/rdsoze)
|
288
|
+
|
289
|
+
## 0.6.1 - 2012-11-07
|
290
|
+
|
291
|
+
- bugfixes
|
292
|
+
- [#160] Removed |routes| argument from initializer authenticator blocks
|
293
|
+
- documentation
|
294
|
+
- [#160] Fixed description of context of authenticator blocks
|
295
|
+
|
296
|
+
## 0.6.0 - 2012-11-05
|
297
|
+
|
298
|
+
- enhancements
|
299
|
+
- Mongoid `orm` configuration accepts only :mongoid2 or :mongoid3
|
300
|
+
- Authorization endpoint does not redirect in #new action anymore. It wasn't specified by OAuth spec
|
301
|
+
- TokensController now inherits from ActionController::Metal. There might be performance upgrades
|
302
|
+
- Add link to authorization in Applications scaffold
|
303
|
+
- [#116] MongoMapper support [@carols10cents](https://github.com/carols10cents)
|
304
|
+
- [#122] Mongoid3 support [@petergoldstein](https://github.com/petergoldstein)
|
305
|
+
- [#150] Introduce test redirect uri for applications
|
306
|
+
- bugfixes
|
307
|
+
- [#157] Response token status should be `:ok`, not `:success` [@theycallmeswift](https://github.com/theycallmeswift)
|
308
|
+
- [#159] Remove ActionView::Base.field_error_proc override (fixes #145)
|
309
|
+
- internals
|
310
|
+
- Update development dependencies
|
311
|
+
- Several refactorings
|
312
|
+
- Rails/ORM are easily swichable with env vars (rails and orm)
|
313
|
+
- Travis now tests against Mongoid v2
|
314
|
+
|
315
|
+
## 0.5.0 - 2012-10-20
|
316
|
+
|
317
|
+
Official support for rubinius was removed.
|
318
|
+
|
319
|
+
- enhancements
|
320
|
+
- Configure the way access token is retrieved from request (default to bearer header)
|
321
|
+
- Authorization Code expiration time is now configurable
|
322
|
+
- Add support for mongoid
|
323
|
+
- [#78, #128, #137, #138] Application Ownership
|
324
|
+
- [#92] Allow users to skip controllers
|
325
|
+
- [#99] Remove deprecated warnings for data-* attributes [@towerhe](https://github.com/towerhe)
|
326
|
+
- [#101] Return existing access_token for PasswordAccessTokenRequest [@benoist](https://github.com/benoist)
|
327
|
+
- [#104] Changed access token scopes example code to default_scopes and optional_scopes [@amkirwan](https://github.com/amkirwan)
|
328
|
+
- [#107] Fix typos in initializer
|
329
|
+
- [#123] i18n for validator, flash messages [@petergoldstein](https://github.com/petergoldstein)
|
330
|
+
- [#140] ActiveRecord is the default value for the ORM [@petergoldstein](https://github.com/petergoldstein)
|
331
|
+
- internals
|
332
|
+
- [#112, #120] Replacing update_attribute with update_column to eliminate deprecation warnings [@rmoriz](https://github.com/rmoriz), [@petergoldstein](https://github.com/petergoldstein)
|
333
|
+
- [#121] Updating all development dependencies to recent versions. [@petergoldstein](https://github.com/petergoldstein)
|
334
|
+
- [#144] Adding MongoDB dependency to .travis.yml [@petergoldstein](https://github.com/petergoldstein)
|
335
|
+
- [#143] Displays errors for unconfigured error messages [@timgaleckas](https://github.com/timgaleckas)
|
336
|
+
- bugfixes
|
337
|
+
- [#102] Not returning 401 when access token generation fails [@cslew](https://github.com/cslew)
|
338
|
+
- [#125] Doorkeeper is using ActiveRecord version of as_json in ORM agnostic code [@petergoldstein](https://github.com/petergoldstein)
|
339
|
+
- [#142] Prevent double submission of password based authentication [@bdurand](https://github.com/bdurand)
|
340
|
+
- documentation
|
341
|
+
- [#141] Add rack-cors middleware to readme [@gottfrois](https://github.com/gottfrois)
|
342
|
+
|
343
|
+
## 0.4.2 - 2012-06-05
|
344
|
+
|
345
|
+
- bugfixes:
|
346
|
+
- [#94] Uninitialized Constant in Password Flow
|
347
|
+
|
348
|
+
## 0.4.1 - 2012-06-02
|
349
|
+
|
350
|
+
- enhancements:
|
351
|
+
- Backport: Move doorkeeper_for extension to Filter helper
|
352
|
+
|
353
|
+
## 0.4.0 - 2012-05-26
|
354
|
+
|
355
|
+
- deprecation
|
356
|
+
- Deprecate authorization_scopes
|
357
|
+
- database changes
|
358
|
+
- AccessToken#resource_owner_id is not nullable
|
359
|
+
- enhancements
|
360
|
+
- [#83] Add Resource Owner Password Credentials flow [@jaimeiniesta](https://github.com/jaimeiniesta)
|
361
|
+
- [#76] Allow token expiration to be disabled [@mattgreen](https://github.com/mattgreen)
|
362
|
+
- [#89] Configure the way client credentials are retrieved from request
|
363
|
+
- [#b6470a] Add Client Credentials flow
|
364
|
+
- internals
|
365
|
+
- [#2ece8d, #f93778] Introduce Client and ErrorResponse classes
|
366
|
+
|
367
|
+
## 0.3.4 - 2012-05-24
|
368
|
+
|
369
|
+
- Fix attr_accessible for rails 3.2.x
|
370
|
+
|
371
|
+
## 0.3.3 - 2012-05-07
|
372
|
+
|
373
|
+
- [#86] shrink gem package size
|
374
|
+
|
375
|
+
## 0.3.2 - 2012-04-29
|
376
|
+
|
377
|
+
- enhancements
|
378
|
+
- [#54] Ignore Authorization: headers that are not Bearer [@miyagawa](https://github.com/miyagawa)
|
379
|
+
- [#58, #64] Add destroy action to applications endpoint [@jaimeiniesta](https://github.com/jaimeiniesta), [@davidfrey](https://github.com/davidfrey)
|
380
|
+
- [#63] TokensController responds with `401 unauthorized` [@jaimeiniesta](https://github.com/jaimeiniesta)
|
381
|
+
- [#67, #72] Fix for mass-assignment [@cicloid](https://github.com/cicloid)
|
382
|
+
- internals
|
383
|
+
- [#49] Add Gemnasium status image to README [@laserlemon](https://github.com/laserlemon)
|
384
|
+
- [#50] Fix typos [@tomekw](https://github.com/tomekw)
|
385
|
+
- [#51] Updated the factory_girl_rails dependency, fix expires_in response which returned a float number instead of integer [@antekpiechnik](https://github.com/antekpiechnik)
|
386
|
+
- [#62] Typos, .gitignore [@jaimeiniesta](https://github.com/jaimeiniesta)
|
387
|
+
- [#65] Change _path redirections to _url redirections [@jaimeiniesta](https://github.com/jaimeiniesta)
|
388
|
+
- [#75] Fix unknown method #authenticate_admin! [@mattgreen](https://github.com/mattgreen)
|
389
|
+
- Remove application link in authorized app view
|
390
|
+
|
391
|
+
## 0.3.1 - 2012-02-17
|
392
|
+
|
393
|
+
- enhancements
|
394
|
+
- [#48] Add if, else options to doorkeeper_for
|
395
|
+
- Add views generator
|
396
|
+
- internals
|
397
|
+
- Namespace models
|
398
|
+
|
399
|
+
## 0.3.0 - 2012-02-11
|
400
|
+
|
401
|
+
- enhancements
|
402
|
+
- [#17, #31] Add support for client credentials in basic auth header [@GoldsteinTechPartners](https://github.com/GoldsteinTechPartners)
|
403
|
+
- [#28] Add indices to migration [@GoldsteinTechPartners](https://github.com/GoldsteinTechPartners)
|
404
|
+
- [#29] Allow doorkeeper to run with rails 3.2 [@john-griffin](https://github.com/john-griffin)
|
405
|
+
- [#30] Improve client's redirect uri validation [@GoldsteinTechPartners](https://github.com/GoldsteinTechPartners)
|
406
|
+
- [#32] Add token (implicit grant) flow [@GoldsteinTechPartners](https://github.com/GoldsteinTechPartners)
|
407
|
+
- [#34] Add support for custom unathorized responses [@GoldsteinTechPartners](https://github.com/GoldsteinTechPartners)
|
408
|
+
- [#36] Remove repetitions from the Authorised Applications view [@carvil](https://github.com/carvil)
|
409
|
+
- When user revoke an application, all tokens for that application are revoked
|
410
|
+
- Error messages now can be translated
|
411
|
+
- Install generator copies the error messages localization file
|
412
|
+
- internals
|
413
|
+
- Fix deprecation warnings in ActiveSupport::Base64
|
414
|
+
- Remove deprecation in doorkeeper_for that handles hash arguments
|
415
|
+
- Depends on railties instead of whole rails framework
|
416
|
+
- CI now integrates with rails 3.1 and 3.2
|
417
|
+
|
418
|
+
## 0.2.0 - 2011-12-17
|
419
|
+
|
420
|
+
- enhancements
|
421
|
+
- [#4] Add authorized applications endpoint
|
422
|
+
- [#5, #11] Add access token scopes
|
423
|
+
- [#10] Add access token expiration by default
|
424
|
+
- [#9, #12] Add refresh token flow
|
425
|
+
- internals
|
426
|
+
- [#7] Improve configuration options with :default
|
427
|
+
- Improve configuration options with :builder
|
428
|
+
- Refactor config class
|
429
|
+
- Improve coverage of authorization request integration
|
430
|
+
- bug fixes
|
431
|
+
- [#6, #20] Fix access token response headers
|
432
|
+
- Fix issue with state parameter
|
433
|
+
- deprecation
|
434
|
+
- deprecate :only and :except options in doorkeeper_for
|
435
|
+
|
436
|
+
## 0.1.1 - 2011-11-30
|
437
|
+
|
438
|
+
- enhancements
|
439
|
+
- [#3] Authorization code must be short lived and single use
|
440
|
+
- [#2] Improve views provided by doorkeeper
|
441
|
+
- [#1] Skips authorization form if the client has been authorized by the resource owner
|
442
|
+
- Improve readme
|
443
|
+
- bugfixes
|
444
|
+
- Fix issue when creating the access token (wrong client id)
|
445
|
+
|
446
|
+
## 0.1.0 - 2011-11-25
|
447
|
+
|
448
|
+
- Authorization Code flow
|
449
|
+
- OAuth applications endpoint
|
data/README.md
CHANGED
@@ -28,10 +28,12 @@ https://github.com/doorkeeper-gem/doorkeeper/releases.
|
|
28
28
|
- [MongoMapper indexes](#mongomapper-indexes)
|
29
29
|
- [Routes](#routes)
|
30
30
|
- [Authenticating](#authenticating)
|
31
|
+
- [Internationalization (I18n)](#internationalization-i18n)
|
31
32
|
- [Protecting resources with OAuth (a.k.a your API endpoint)](#protecting-resources-with-oauth-aka-your-api-endpoint)
|
32
33
|
- [Protect your API with OAuth when using Grape](#protect-your-api-with-oauth-when-using-grape)
|
33
34
|
- [Route Constraints and other integrations](#route-constraints-and-other-integrations)
|
34
35
|
- [Access Token Scopes](#access-token-scopes)
|
36
|
+
- [Custom Access Token Generator](#custom-access-token-generator)
|
35
37
|
- [Authenticated resource owner](#authenticated-resource-owner)
|
36
38
|
- [Applications list](#applications-list)
|
37
39
|
- [Other customizations](#other-customizations)
|
@@ -44,8 +46,10 @@ https://github.com/doorkeeper-gem/doorkeeper/releases.
|
|
44
46
|
- [Screencast](#screencast)
|
45
47
|
- [Client applications](#client-applications)
|
46
48
|
- [Contributors](#contributors)
|
49
|
+
- [IETF Standards](#ietf-standards)
|
47
50
|
- [License](#license)
|
48
51
|
|
52
|
+
|
49
53
|
## Useful links
|
50
54
|
|
51
55
|
- For documentation, please check out our [wiki](https://github.com/doorkeeper-gem/doorkeeper/wiki)
|
@@ -158,6 +162,12 @@ the methods defined over there.
|
|
158
162
|
You may want to check other ways of authentication
|
159
163
|
[here](https://github.com/doorkeeper-gem/doorkeeper/wiki/Authenticating-using-Clearance-or-DIY).
|
160
164
|
|
165
|
+
|
166
|
+
### Internationalization (I18n)
|
167
|
+
|
168
|
+
See language files in [the I18n repository](https://github.com/doorkeeper-gem/doorkeeper-i18n).
|
169
|
+
|
170
|
+
|
161
171
|
## Protecting resources with OAuth (a.k.a your API endpoint)
|
162
172
|
|
163
173
|
To protect your API with OAuth, you just need to setup `before_action`s
|
@@ -253,9 +263,42 @@ class Api::V1::ProductsController < Api::V1::ApiController
|
|
253
263
|
end
|
254
264
|
```
|
255
265
|
|
256
|
-
|
257
|
-
|
258
|
-
|
266
|
+
Please note that there is a logical OR between multiple required scopes. In
|
267
|
+
above example, `doorkeeper_authorize! :admin, :write` means that the access
|
268
|
+
token is required to have either `:admin` scope or `:write` scope, but not need
|
269
|
+
have both of them.
|
270
|
+
|
271
|
+
If want to require the access token to have multiple scopes at the same time,
|
272
|
+
use multiple `doorkeeper_authorize!`, for example:
|
273
|
+
|
274
|
+
```ruby
|
275
|
+
class Api::V1::ProductsController < Api::V1::ApiController
|
276
|
+
before_action -> { doorkeeper_authorize! :public }, only: :index
|
277
|
+
before_action only: [:create, :update, :destroy] do
|
278
|
+
doorkeeper_authorize! :admin
|
279
|
+
doorkeeper_authorize! :write
|
280
|
+
end
|
281
|
+
end
|
282
|
+
```
|
283
|
+
|
284
|
+
In above example, a client can call `:create` action only if its access token
|
285
|
+
have both `:admin` and `:write` scopes.
|
286
|
+
|
287
|
+
### Custom Access Token Generator
|
288
|
+
|
289
|
+
By default a 32 bit access token will be generated. If you require a custom
|
290
|
+
token, such as [JWT](http://jwt.io), specify an object that responds to
|
291
|
+
`.generate(options = {})` and returns a string to be used as the token.
|
292
|
+
|
293
|
+
```ruby
|
294
|
+
Doorkeeper.configure do
|
295
|
+
access_token_generator "Doorkeeper::JWT"
|
296
|
+
end
|
297
|
+
```
|
298
|
+
|
299
|
+
JWT token support is available with
|
300
|
+
[Doorkeeper-JWT](https://github.com/chriswarren/doorkeeper-jwt).
|
301
|
+
|
259
302
|
|
260
303
|
### Authenticated resource owner
|
261
304
|
|