Skip to content

Commit

Permalink
Memoize authentication failure
Browse files Browse the repository at this point in the history
  • Loading branch information
c960657 committed Jan 22, 2025
1 parent 6f249c8 commit baf936f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ User-visible changes worth mentioning.

Add your entry here.
- [#1755] Fix the error message for force_pkce
- [#1761] Memoize authentication failure

## 5.8.1

Expand Down
4 changes: 3 additions & 1 deletion lib/doorkeeper/rails/helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ def doorkeeper_invalid_token_response?
end

def doorkeeper_token
@doorkeeper_token ||= OAuth::Token.authenticate(
return @doorkeeper_token if defined?(@doorkeeper_token)

@doorkeeper_token = OAuth::Token.authenticate(
request,
*Doorkeeper.config.access_token_methods,
)
Expand Down

0 comments on commit baf936f

Please sign in to comment.