Skip to content

Commit

Permalink
fix account_application custom flow
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthieu Paret committed Feb 17, 2015
1 parent 067a6c4 commit 7af1ffc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/doorkeeper/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def extended(base)
option :realm, default: 'Doorkeeper'
option :wildcard_redirect_uri, default: false
option :force_ssl_in_redirect_uri, default: !Rails.env.development?
option :grant_flows, default: %w(authorization_code client_credentials account_application)
option :grant_flows, default: %w(authorization_code client_credentials)

attr_reader :reuse_access_token

Expand Down Expand Up @@ -264,7 +264,7 @@ def token_grant_types
def calculate_authorization_response_types
types = []
types << 'code' if grant_flows.include? 'authorization_code'
types << 'token' if grant_flows.include? 'implicit'
types << 'token' if (grant_flows.include?('implicit') || grant_flows.include?('account_application'))
types
end

Expand Down
2 changes: 1 addition & 1 deletion spec/lib/config_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@
describe "grant_flows" do
it "is set to all grant flows by default" do
expect(Doorkeeper.configuration.grant_flows).
to eq(%w(authorization_code client_credentials account_application))
to eq(%w(authorization_code client_credentials))
end

it "can change the value" do
Expand Down

0 comments on commit 7af1ffc

Please sign in to comment.