doorkeeper 2.0.1 → 2.1.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/.travis.yml +3 -3
- data/CHANGELOG.md +19 -0
- data/README.md +6 -0
- data/app/views/doorkeeper/applications/_delete_form.html.erb +1 -1
- data/app/views/doorkeeper/applications/_form.html.erb +5 -6
- data/app/views/doorkeeper/applications/edit.html.erb +1 -1
- data/app/views/doorkeeper/applications/index.html.erb +5 -5
- data/app/views/doorkeeper/applications/new.html.erb +1 -1
- data/app/views/doorkeeper/applications/show.html.erb +7 -7
- data/app/views/doorkeeper/authorizations/error.html.erb +1 -1
- data/app/views/doorkeeper/authorizations/new.html.erb +5 -5
- data/app/views/doorkeeper/authorizations/show.html.erb +1 -1
- data/app/views/doorkeeper/authorized_applications/_delete_form.html.erb +1 -1
- data/app/views/doorkeeper/authorized_applications/index.html.erb +4 -4
- data/app/views/layouts/doorkeeper/admin.html.erb +2 -2
- data/app/views/layouts/doorkeeper/application.html.erb +1 -1
- data/config/locales/en.yml +77 -0
- data/gemfiles/Gemfile.common.rb +1 -1
- data/lib/doorkeeper/config.rb +4 -6
- data/lib/doorkeeper/models/access_token_mixin.rb +16 -4
- data/lib/doorkeeper/oauth/client.rb +1 -1
- data/lib/doorkeeper/oauth/client_credentials/validation.rb +15 -3
- data/lib/doorkeeper/oauth/helpers/scope_checker.rb +9 -8
- data/lib/doorkeeper/oauth/password_access_token_request.rb +1 -1
- data/lib/doorkeeper/oauth/pre_authorization.rb +5 -5
- data/lib/doorkeeper/oauth/refresh_token_request.rb +9 -1
- data/lib/doorkeeper/oauth/token_response.rb +2 -1
- data/lib/doorkeeper/version.rb +1 -1
- data/lib/generators/doorkeeper/templates/initializer.rb +8 -2
- data/spec/controllers/authorizations_controller_spec.rb +3 -0
- data/spec/dummy/config/environments/test.rb +0 -1
- data/spec/dummy/config/initializers/doorkeeper.rb +62 -18
- data/spec/lib/config_spec.rb +2 -6
- data/spec/lib/oauth/client_credentials/validation_spec.rb +26 -3
- data/spec/lib/oauth/helpers/scope_checker_spec.rb +25 -35
- data/spec/lib/oauth/password_access_token_request_spec.rb +8 -1
- data/spec/lib/oauth/pre_authorization_spec.rb +2 -0
- data/spec/lib/oauth/refresh_token_request_spec.rb +1 -1
- data/spec/lib/oauth/token_request_spec.rb +5 -1
- data/spec/lib/oauth/token_response_spec.rb +15 -9
- data/spec/models/doorkeeper/access_token_spec.rb +23 -8
- data/spec/requests/endpoints/authorization_spec.rb +6 -12
- data/spec/requests/flows/implicit_grant_errors_spec.rb +1 -0
- data/spec/requests/flows/implicit_grant_spec.rb +1 -0
- data/spec/requests/flows/password_spec.rb +1 -1
- data/spec/requests/flows/refresh_token_spec.rb +3 -4
- data/spec/spec_helper_integration.rb +1 -1
- data/spec/support/helpers/authorization_request_helper.rb +9 -0
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b0abbae8c4f801c1aa44f9fc72f4a3831bd3e73b
|
4
|
+
data.tar.gz: d746e44cad2903afa1e5554addd63b9079607c40
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8559b5207473daae2568caa506588cc9857d5e9c93f34f0bed25c91a8fce7f579b645d26cf7f4e7006d3f477f84600b8df6046c4daab84a25be5fc984d98eb67
|
7
|
+
data.tar.gz: 76bdef782af41cd9fd349f30c2a0736e0e06ebc6aed80ae3c1e14b225d2bee900e22a8c4105a7e209965f4934b939cfbf92ed08b979c30ba87a82637b3b5aef4
|
data/.travis.yml
CHANGED
@@ -12,7 +12,7 @@ env:
|
|
12
12
|
- rails=3.2.0
|
13
13
|
- rails=4.0.0
|
14
14
|
- rails=4.1.0
|
15
|
-
- rails=4.2.0
|
15
|
+
- rails=4.2.0
|
16
16
|
|
17
17
|
gemfile:
|
18
18
|
- Gemfile
|
@@ -31,14 +31,14 @@ matrix:
|
|
31
31
|
- gemfile: gemfiles/Gemfile.mongoid2.rb
|
32
32
|
env: rails=4.1.0
|
33
33
|
- gemfile: gemfiles/Gemfile.mongoid2.rb
|
34
|
-
env: rails=4.2.0
|
34
|
+
env: rails=4.2.0
|
35
35
|
|
36
36
|
- gemfile: gemfiles/Gemfile.mongoid3.rb
|
37
37
|
env: rails=4.0.0
|
38
38
|
- gemfile: gemfiles/Gemfile.mongoid3.rb
|
39
39
|
env: rails=4.1.0
|
40
40
|
- gemfile: gemfiles/Gemfile.mongoid3.rb
|
41
|
-
env: rails=4.2.0
|
41
|
+
env: rails=4.2.0
|
42
42
|
|
43
43
|
- gemfile: gemfiles/Gemfile.mongoid4.rb
|
44
44
|
env: rails=3.1.0
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,24 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## master
|
4
|
+
|
5
|
+
|
6
|
+
## 2.1.0
|
7
|
+
|
8
|
+
- [#540] Include `created_at` in response.
|
9
|
+
- [#538] Check application-level scopes in client_credentials and password flow.
|
10
|
+
- [5596227] Check application scopes in AccessToken when present. Fixes a bug in
|
11
|
+
doorkeeper 2.0.0 and 2.0.1 referring to application specific scopes.
|
12
|
+
- [#534] Internationalizes doorkeeper views.
|
13
|
+
- Enable by default `authorization_code` and `client_credentials` grant flows.
|
14
|
+
Disables implicit and password grant flows by default.
|
15
|
+
- [#510, #544, 722113f] Revoked refresh token response bugfix.
|
16
|
+
- [#545] Ensure there is a connection to the database before checking for
|
17
|
+
missing columns
|
18
|
+
- [#546] Use `Doorkeeper::` prefix when referencing `Application` to avoid
|
19
|
+
possible application model name conflict.
|
20
|
+
- [#538] Test with Rails ~> 4.2.
|
21
|
+
|
3
22
|
## 2.0.1
|
4
23
|
|
5
24
|
- [#525, #526, #527] Fix `ActiveRecord::NoDatabaseError` on gem load.
|
data/README.md
CHANGED
@@ -344,6 +344,12 @@ here](https://github.com/doorkeeper-gem/doorkeeper/wiki/Testing-your-provider-wi
|
|
344
344
|
Thanks to all our [awesome
|
345
345
|
contributors](https://github.com/doorkeeper-gem/doorkeeper/contributors)!
|
346
346
|
|
347
|
+
|
348
|
+
### IETF Standards
|
349
|
+
|
350
|
+
* [The OAuth 2.0 Authorization Framework](http://tools.ietf.org/html/rfc6749)
|
351
|
+
* [OAuth 2.0 Threat Model and Security Considerations](http://tools.ietf.org/html/rfc6819)
|
352
|
+
|
347
353
|
### License
|
348
354
|
|
349
355
|
MIT License. Copyright 2011 Applicake.
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<%- submit_btn_css ||= 'btn btn-link' %>
|
2
2
|
<%= form_tag oauth_application_path(application) do %>
|
3
3
|
<input type="hidden" name="_method" value="delete">
|
4
|
-
<%= submit_tag '
|
4
|
+
<%= submit_tag t('doorkeeper.applications.buttons.destroy'), onclick: "return confirm('#{ t('doorkeeper.applications.confirmations.destroy') }')", class: submit_btn_css %>
|
5
5
|
<% end %>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<%= form_for application, url: doorkeeper_submit_path(application), html: {class: 'form-horizontal', role: 'form'} do |f| %>
|
2
2
|
<% if application.errors.any? %>
|
3
|
-
<div class="alert alert-danger" data-alert><p
|
3
|
+
<div class="alert alert-danger" data-alert><p><%= t('doorkeeper.applications.form.error') %></p></div>
|
4
4
|
<% end %>
|
5
5
|
|
6
6
|
<%= content_tag :div, class: "form-group#{' has-error' if application.errors[:name].present?}" do %>
|
@@ -17,11 +17,11 @@
|
|
17
17
|
<%= f.text_area :redirect_uri, class: 'form-control' %>
|
18
18
|
<%= doorkeeper_errors_for application, :redirect_uri %>
|
19
19
|
<span class="help-block">
|
20
|
-
|
20
|
+
<%= t('doorkeeper.applications.help.redirect_uri') %>
|
21
21
|
</span>
|
22
22
|
<% if Doorkeeper.configuration.native_redirect_uri %>
|
23
23
|
<span class="help-block">
|
24
|
-
|
24
|
+
<%= raw t('doorkeeper.applications.help.native_redirect_uri', native_redirect_uri: "<code>#{ Doorkeeper.configuration.native_redirect_uri }</code>") %>
|
25
25
|
</span>
|
26
26
|
<% end %>
|
27
27
|
</div>
|
@@ -29,9 +29,8 @@
|
|
29
29
|
|
30
30
|
<div class="form-group">
|
31
31
|
<div class="col-sm-offset-2 col-sm-10">
|
32
|
-
<%= f.submit '
|
33
|
-
<%= link_to
|
32
|
+
<%= f.submit t('doorkeeper.applications.buttons.submit'), class: "btn btn-primary" %>
|
33
|
+
<%= link_to t('doorkeeper.applications.buttons.cancel'), oauth_applications_path, :class => "btn btn-default" %>
|
34
34
|
</div>
|
35
35
|
</div>
|
36
36
|
<% end %>
|
37
|
-
|
@@ -1,14 +1,14 @@
|
|
1
1
|
<div class="page-header">
|
2
|
-
<h1
|
2
|
+
<h1><%= t('.title') %></h1>
|
3
3
|
</div>
|
4
4
|
|
5
|
-
<p><%= link_to '
|
5
|
+
<p><%= link_to t('.new'), new_oauth_application_path, class: 'btn btn-success' %></p>
|
6
6
|
|
7
7
|
<table class="table table-striped">
|
8
8
|
<thead>
|
9
9
|
<tr>
|
10
|
-
<th
|
11
|
-
<th
|
10
|
+
<th><%= t('.name') %></th>
|
11
|
+
<th><%= t('.callback_url') %></th>
|
12
12
|
<th></th>
|
13
13
|
<th></th>
|
14
14
|
</tr>
|
@@ -18,7 +18,7 @@
|
|
18
18
|
<tr id="application_<%= application.id %>">
|
19
19
|
<td><%= link_to application.name, oauth_application_path(application) %></td>
|
20
20
|
<td><%= application.redirect_uri %></td>
|
21
|
-
<td><%= link_to '
|
21
|
+
<td><%= link_to t('doorkeeper.applications.buttons.edit'), edit_oauth_application_path(application), class: 'btn btn-link' %></td>
|
22
22
|
<td><%= render 'delete_form', application: application %></td>
|
23
23
|
</tr>
|
24
24
|
<% end %>
|
@@ -1,18 +1,18 @@
|
|
1
1
|
<div class="page-header">
|
2
|
-
<h1
|
2
|
+
<h1><%= t('.title', name: @application.name) %></h1>
|
3
3
|
</div>
|
4
4
|
|
5
5
|
<div class="row">
|
6
6
|
<div class="col-md-8">
|
7
|
-
<h4
|
7
|
+
<h4><%= t('.application_id') %>:</h4>
|
8
8
|
|
9
9
|
<p><code id="application_id"><%= @application.uid %></code></p>
|
10
10
|
|
11
|
-
<h4
|
11
|
+
<h4><%= t('.secret') %>:</h4>
|
12
12
|
|
13
13
|
<p><code id="secret"><%= @application.secret %></code></p>
|
14
14
|
|
15
|
-
<h4
|
15
|
+
<h4><%= t('.callback_urls') %>:</h4>
|
16
16
|
|
17
17
|
<table>
|
18
18
|
<% @application.redirect_uri.split.each do |uri| %>
|
@@ -21,7 +21,7 @@
|
|
21
21
|
<code><%= uri %></code>
|
22
22
|
</td>
|
23
23
|
<td>
|
24
|
-
<%= link_to '
|
24
|
+
<%= link_to t('doorkeeper.applications.buttons.authorize'), oauth_authorization_path(client_id: @application.uid, redirect_uri: uri, response_type: 'code'), class: 'btn btn-success', target: '_blank' %>
|
25
25
|
</td>
|
26
26
|
</tr>
|
27
27
|
<% end %>
|
@@ -29,9 +29,9 @@
|
|
29
29
|
</div>
|
30
30
|
|
31
31
|
<div class="col-md-4">
|
32
|
-
<h3
|
32
|
+
<h3><%= t('.actions') %></h3>
|
33
33
|
|
34
|
-
<p><%= link_to '
|
34
|
+
<p><%= link_to t('doorkeeper.applications.buttons.edit'), edit_oauth_application_path(@application), class: 'btn btn-primary' %></p>
|
35
35
|
|
36
36
|
<p><%= render 'delete_form', application: @application, submit_btn_css: 'btn btn-danger' %></p>
|
37
37
|
</div>
|
@@ -1,15 +1,15 @@
|
|
1
1
|
<header class="page-header" role="banner">
|
2
|
-
<h1
|
2
|
+
<h1><%= t('.title') %></h1>
|
3
3
|
</header>
|
4
4
|
|
5
5
|
<main role="main">
|
6
6
|
<p class="h4">
|
7
|
-
|
7
|
+
<%= raw t('.prompt', client_name: "<strong class=\"text-info\">#{ @pre_auth.client.name }</strong>") %>
|
8
8
|
</p>
|
9
9
|
|
10
10
|
<% if @pre_auth.scopes %>
|
11
11
|
<div id="oauth-permissions">
|
12
|
-
<p
|
12
|
+
<p><%= t('.able_to') %>:</p>
|
13
13
|
|
14
14
|
<ul class="text-info">
|
15
15
|
<% @pre_auth.scopes.each do |scope| %>
|
@@ -26,7 +26,7 @@
|
|
26
26
|
<%= hidden_field_tag :state, @pre_auth.state %>
|
27
27
|
<%= hidden_field_tag :response_type, @pre_auth.response_type %>
|
28
28
|
<%= hidden_field_tag :scope, @pre_auth.scope %>
|
29
|
-
<%= submit_tag
|
29
|
+
<%= submit_tag t('doorkeeper.authorizations.buttons.authorize'), class: "btn btn-success btn-lg btn-block" %>
|
30
30
|
<% end %>
|
31
31
|
<%= form_tag oauth_authorization_path, method: :delete do %>
|
32
32
|
<%= hidden_field_tag :client_id, @pre_auth.client.uid %>
|
@@ -34,7 +34,7 @@
|
|
34
34
|
<%= hidden_field_tag :state, @pre_auth.state %>
|
35
35
|
<%= hidden_field_tag :response_type, @pre_auth.response_type %>
|
36
36
|
<%= hidden_field_tag :scope, @pre_auth.scope %>
|
37
|
-
<%= submit_tag
|
37
|
+
<%= submit_tag t('doorkeeper.authorizations.buttons.deny'), class: "btn btn-danger btn-lg btn-block" %>
|
38
38
|
<% end %>
|
39
39
|
</div>
|
40
40
|
</main>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<%- submit_btn_css ||= 'btn btn-link' %>
|
2
2
|
<%= form_tag oauth_authorized_application_path(application) do %>
|
3
3
|
<input type="hidden" name="_method" value="delete">
|
4
|
-
<%= submit_tag '
|
4
|
+
<%= submit_tag t('doorkeeper.authorized_applications.buttons.revoke'), onclick: "return confirm('#{ t('doorkeeper.authorized_applications.confirmations.revoke') }')", class: submit_btn_css %>
|
5
5
|
<% end %>
|
@@ -1,13 +1,13 @@
|
|
1
1
|
<header class="page-header">
|
2
|
-
<h1
|
2
|
+
<h1><%= t('doorkeeper.authorized_applications.index.title') %></h1>
|
3
3
|
</header>
|
4
4
|
|
5
5
|
<main role="main">
|
6
6
|
<table class="table table-striped">
|
7
7
|
<thead>
|
8
8
|
<tr>
|
9
|
-
<th
|
10
|
-
<th
|
9
|
+
<th><%= t('doorkeeper.authorized_applications.index.application') %></th>
|
10
|
+
<th><%= t('doorkeeper.authorized_applications.index.created_at') %></th>
|
11
11
|
<th></th>
|
12
12
|
<th></th>
|
13
13
|
</tr>
|
@@ -16,7 +16,7 @@
|
|
16
16
|
<% @applications.each do |application| %>
|
17
17
|
<tr>
|
18
18
|
<td><%= application.name %></td>
|
19
|
-
<td><%= application.created_at.strftime('
|
19
|
+
<td><%= application.created_at.strftime(t('doorkeeper.authorized_applications.index.date_format')) %></td>
|
20
20
|
<td><%= render 'delete_form', application: application %></td>
|
21
21
|
</tr>
|
22
22
|
<% end %>
|
@@ -12,11 +12,11 @@
|
|
12
12
|
<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
|
13
13
|
<div class="container">
|
14
14
|
<div class="navbar-header">
|
15
|
-
<%= link_to '
|
15
|
+
<%= link_to t('doorkeeper.layouts.admin.nav.oauth2_provider'), oauth_applications_path, class: 'navbar-brand' %>
|
16
16
|
</div>
|
17
17
|
<ul class="nav navbar-nav">
|
18
18
|
<%= content_tag :li, class: "#{'active' if request.path == oauth_applications_path}" do %>
|
19
|
-
<%= link_to '
|
19
|
+
<%= link_to t('doorkeeper.layouts.admin.nav.applications'), oauth_applications_path %>
|
20
20
|
<% end %>
|
21
21
|
</ul>
|
22
22
|
</div>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<!DOCTYPE html>
|
2
2
|
<html>
|
3
3
|
<head>
|
4
|
-
<title
|
4
|
+
<title><%= t('doorkeeper.layouts.application.title') %></title>
|
5
5
|
<meta charset="utf-8">
|
6
6
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
7
7
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
data/config/locales/en.yml
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
en:
|
2
2
|
activerecord:
|
3
|
+
attributes:
|
4
|
+
doorkeeper/application:
|
5
|
+
name: 'Name'
|
6
|
+
redirect_uri: 'Redirect URI'
|
3
7
|
errors:
|
4
8
|
models:
|
5
9
|
doorkeeper/application:
|
@@ -9,7 +13,12 @@ en:
|
|
9
13
|
invalid_uri: 'must be a valid URI.'
|
10
14
|
relative_uri: 'must be an absolute URI.'
|
11
15
|
secured_uri: 'must be an HTTPS/SSL URI.'
|
16
|
+
|
12
17
|
mongoid:
|
18
|
+
attributes:
|
19
|
+
doorkeeper/application:
|
20
|
+
name: 'Name'
|
21
|
+
redirect_uri: 'Redirect URI'
|
13
22
|
errors:
|
14
23
|
models:
|
15
24
|
doorkeeper/application:
|
@@ -19,7 +28,12 @@ en:
|
|
19
28
|
invalid_uri: 'must be a valid URI.'
|
20
29
|
relative_uri: 'must be an absolute URI.'
|
21
30
|
secured_uri: 'must be an HTTPS/SSL URI.'
|
31
|
+
|
22
32
|
mongo_mapper:
|
33
|
+
attributes:
|
34
|
+
doorkeeper/application:
|
35
|
+
name: 'Name'
|
36
|
+
redirect_uri: 'Redirect URI'
|
23
37
|
errors:
|
24
38
|
models:
|
25
39
|
doorkeeper/application:
|
@@ -29,7 +43,62 @@ en:
|
|
29
43
|
invalid_uri: 'must be a valid URI.'
|
30
44
|
relative_uri: 'must be an absolute URI.'
|
31
45
|
secured_uri: 'must be an HTTPS/SSL URI.'
|
46
|
+
|
32
47
|
doorkeeper:
|
48
|
+
applications:
|
49
|
+
confirmations:
|
50
|
+
destroy: 'Are you sure?'
|
51
|
+
buttons:
|
52
|
+
edit: 'Edit'
|
53
|
+
destroy: 'Destroy'
|
54
|
+
submit: 'Submit'
|
55
|
+
cancel: 'Cancel'
|
56
|
+
authorize: 'Authorize'
|
57
|
+
form:
|
58
|
+
error: 'Whoops! Check your form for possible errors'
|
59
|
+
help:
|
60
|
+
redirect_uri: 'Use one line per URI'
|
61
|
+
native_redirect_uri: 'Use %{native_redirect_uri} for local tests'
|
62
|
+
edit:
|
63
|
+
title: 'Edit application'
|
64
|
+
index:
|
65
|
+
title: 'Your applications'
|
66
|
+
new: 'New Application'
|
67
|
+
name: 'Name'
|
68
|
+
callback_url: 'Callback URL'
|
69
|
+
new:
|
70
|
+
title: 'New Application'
|
71
|
+
show:
|
72
|
+
title: 'Application: %{name}'
|
73
|
+
application_id: 'Application Id'
|
74
|
+
secret: 'Secret'
|
75
|
+
callback_urls: 'Callback urls'
|
76
|
+
actions: 'Actions'
|
77
|
+
|
78
|
+
authorizations:
|
79
|
+
buttons:
|
80
|
+
authorize: 'Authorize'
|
81
|
+
deny: 'Deny'
|
82
|
+
error:
|
83
|
+
title: 'An error has occurred'
|
84
|
+
new:
|
85
|
+
title: 'Authorize required'
|
86
|
+
prompt: 'Authorize %{client_name} to use your account?'
|
87
|
+
able_to: 'This application will be able to'
|
88
|
+
show:
|
89
|
+
title: 'Authorization code'
|
90
|
+
|
91
|
+
authorized_applications:
|
92
|
+
confirmations:
|
93
|
+
revoke: 'Are you sure?'
|
94
|
+
buttons:
|
95
|
+
revoke: 'Revoke'
|
96
|
+
index:
|
97
|
+
title: 'Your authorized applications'
|
98
|
+
application: 'Application'
|
99
|
+
created_at: 'Created At'
|
100
|
+
date_format: '%Y-%m-%d %H:%M:%S'
|
101
|
+
|
33
102
|
errors:
|
34
103
|
messages:
|
35
104
|
# Common error messages
|
@@ -72,3 +141,11 @@ en:
|
|
72
141
|
authorized_applications:
|
73
142
|
destroy:
|
74
143
|
notice: 'Application revoked.'
|
144
|
+
|
145
|
+
layouts:
|
146
|
+
admin:
|
147
|
+
nav:
|
148
|
+
oauth2_provider: 'OAuth2 Provider'
|
149
|
+
applications: 'Applications'
|
150
|
+
application:
|
151
|
+
title: 'OAuth authorize required'
|
data/gemfiles/Gemfile.common.rb
CHANGED
data/lib/doorkeeper/config.rb
CHANGED
@@ -18,16 +18,15 @@ module Doorkeeper
|
|
18
18
|
|
19
19
|
def self.check_for_missing_columns
|
20
20
|
if Doorkeeper.configuration.orm == :active_record &&
|
21
|
-
|
21
|
+
ActiveRecord::Base.connected? &&
|
22
|
+
!Doorkeeper::Application.new.attributes.include?("scopes")
|
22
23
|
|
23
24
|
puts <<-MSG.squish
|
24
|
-
[doorkeeper] Missing column: `
|
25
|
+
[doorkeeper] Missing column: `oauth_applications.scopes`.
|
25
26
|
If you are using ActiveRecord run `rails generate doorkeeper:application_scopes
|
26
27
|
&& rake db:migrate` to add it.
|
27
28
|
MSG
|
28
29
|
end
|
29
|
-
rescue ActiveRecord::StatementInvalid, ActiveRecord::NoDatabaseError
|
30
|
-
# trap error when DB is not yet setup
|
31
30
|
end
|
32
31
|
|
33
32
|
def self.enable_orm
|
@@ -194,8 +193,7 @@ and that your `initialize_models!` method doesn't raise any errors.\n
|
|
194
193
|
option :realm, default: 'Doorkeeper'
|
195
194
|
option :wildcard_redirect_uri, default: false
|
196
195
|
option :force_ssl_in_redirect_uri, default: !Rails.env.development?
|
197
|
-
option :grant_flows,
|
198
|
-
default: %w(authorization_code implicit password client_credentials)
|
196
|
+
option :grant_flows, default: %w(authorization_code client_credentials)
|
199
197
|
|
200
198
|
attr_reader :reuse_access_token
|
201
199
|
|