Skip to content

Commit 6cadbc8

Browse files
author
Justin Bull
committed
Don't use #client_via_uid fallback on Password strategy
Since credentials will only contain UID when a public application is calling, the fallback method of finding by UID alone is dead code. Private apps are not allowed to be identified by UID alone.
1 parent 41044d9 commit 6cadbc8

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

lib/doorkeeper/request/password.rb

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
module Doorkeeper
44
module Request
55
class Password < Strategy
6-
delegate :credentials, :resource_owner, :parameters, to: :server
6+
delegate :credentials, :resource_owner, :parameters, :client, to: :server
77

88
def request
99
@request ||= OAuth::PasswordAccessTokenRequest.new(
@@ -13,16 +13,6 @@ def request
1313
parameters
1414
)
1515
end
16-
17-
private
18-
19-
def client
20-
if credentials
21-
server.client
22-
elsif parameters[:client_id]
23-
server.client_via_uid
24-
end
25-
end
2616
end
2717
end
2818
end

0 commit comments

Comments
 (0)