lib/doorkeeper/oauth/client_credentials/creator.rb in doorkeeper-5.4.0.rc1 vs lib/doorkeeper/oauth/client_credentials/creator.rb in doorkeeper-5.4.0.rc2
- old
+ new
@@ -23,11 +23,11 @@
end
private
def with_revocation(existing_token:)
- if existing_token && server_config.revoke_previous_client_credentials_token
+ if existing_token && server_config.revoke_previous_client_credentials_token?
existing_token.with_lock do
raise Errors::DoorkeeperError, :invalid_token_reuse if existing_token.revoked?
existing_token.revoke
@@ -37,10 +37,10 @@
yield
end
end
def lookup_existing_token?
- server_config.reuse_access_token || server_config.revoke_previous_client_credentials_token
+ server_config.reuse_access_token || server_config.revoke_previous_client_credentials_token?
end
def find_existing_token_for(client, scopes)
server_config.access_token_model.matching_token_for(client, nil, scopes)
end