lib/doorkeeper/oauth/authorization/token.rb in doorkeeper-5.1.0.rc1 vs lib/doorkeeper/oauth/authorization/token.rb in doorkeeper-5.1.0.rc2

- old
+ new

@@ -6,10 +6,12 @@ class Token attr_accessor :pre_auth, :resource_owner, :token class << self def build_context(pre_auth_or_oauth_client, grant_type, scopes) - oauth_client = if pre_auth_or_oauth_client.respond_to?(:client) + oauth_client = if pre_auth_or_oauth_client.respond_to?(:application) + pre_auth_or_oauth_client.application + elsif pre_auth_or_oauth_client.respond_to?(:client) pre_auth_or_oauth_client.client else pre_auth_or_oauth_client end