0
0
Fork 0

Fix Naming/MemoizedInstanceVariableName cop (#25928)

This commit is contained in:
Matt Jankowski 2023-07-12 04:08:51 -04:00 committed by GitHub
parent 5134fc65e2
commit 2e1391fdd2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 9 additions and 22 deletions

View file

@ -5,9 +5,9 @@ require 'doorkeeper/grape/authorization_decorator'
class Rack::Attack
class Request
def authenticated_token
return @token if defined?(@token)
return @authenticated_token if defined?(@authenticated_token)
@token = Doorkeeper::OAuth::Token.authenticate(
@authenticated_token = Doorkeeper::OAuth::Token.authenticate(
Doorkeeper::Grape::AuthorizationDecorator.new(self),
*Doorkeeper.configuration.access_token_methods
)