diff --git a/CHANGELOG.md b/CHANGELOG.md index 24d3e1935..a190b286a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ User-visible changes worth mentioning. ## master - [#PR ID] Add your PR description here. +- [#1465] Memoize nil doorkeeper_token - [#1457] Make owner_id a bigint for newly-generated owner migrations - [#1452] Empty previous_refresh_token only if present - [#1440] Validate empty host in redirect_uri diff --git a/lib/doorkeeper/helpers/controller.rb b/lib/doorkeeper/helpers/controller.rb index 8cdff7d3e..de3c148e3 100644 --- a/lib/doorkeeper/helpers/controller.rb +++ b/lib/doorkeeper/helpers/controller.rb @@ -38,6 +38,8 @@ def server # :doc: def doorkeeper_token + return @doorkeeper_token if defined?(@doorkeeper_token) + @doorkeeper_token ||= OAuth::Token.authenticate(request, *config_methods) end