diff options
Diffstat (limited to 'app/models/oauth_access_token.rb')
-rw-r--r-- | app/models/oauth_access_token.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/app/models/oauth_access_token.rb b/app/models/oauth_access_token.rb index 7d71e15d3c5..eac99e8d441 100644 --- a/app/models/oauth_access_token.rb +++ b/app/models/oauth_access_token.rb @@ -26,4 +26,13 @@ class OauthAccessToken < Doorkeeper::AccessToken super end + + # Override Doorkeeper::AccessToken.matching_token_for since we + # have `reuse_access_tokens` disabled and we also hash tokens. + # This ensures we don't accidentally return a hashed token value. + def self.matching_token_for(application, resource_owner, scopes) + return if Feature.enabled?(:hash_oauth_tokens) + + super + end end |