lib/doorkeeper/oauth/token.rb in doorkeeper-5.2.6 vs lib/doorkeeper/oauth/token.rb in doorkeeper-5.3.0

- old
+ new

@@ -12,11 +12,11 @@ end end def authenticate(request, *methods) if (token = from_request(request, *methods)) - access_token = AccessToken.by_token(token) - refresh_token_enabled = Doorkeeper.configuration.refresh_token_enabled? + access_token = Doorkeeper.config.access_token_model.by_token(token) + refresh_token_enabled = Doorkeeper.config.refresh_token_enabled? if access_token.present? && refresh_token_enabled access_token.revoke_previous_refresh_token! end access_token end