Fixed
Project:
Simple OAuth (OAuth2) & OpenID Connect
Version:
6.1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
28 Mar 2024 at 12:36 UTC
Updated:
18 Sep 2026 at 11:38 UTC
Jump to comment: Most recent
Comments
Comment #3
gorkagr commentedHi!
I believe that is the place to check if a consumer is active/inactive in combination with the Consumers' MR mentioned in the issue.
Best
Comment #4
gorkagr commentedComment #5
gorkagr commentedI forgot that tests could fail as the patch is using code that does not exist in the consumers module. So back to "needs work" until consumers has a new release with the proposed MR
thnks
Comment #6
gorkagr commentedComment #7
idebr commentedPostponed on #3436723: Add a status/published field in a consumer
Comment #8
claudiu.cristeaTitle to show is blocked
Comment #9
claudiu.cristeaThe blocker has been merged #3436723: Add a status/published field in a consumer. Let's unblock this
Comment #10
bojan_dev commentedWe already have checks in the controllers to verify that
$client_entityis not empty, which will return aninvalid_clienterror if it is. We could update thegetClientEntity()method to only load consumers that are published. This feature would require test coverage before it can be merged.Comment #11
gorkagr commentedHi!
I believe we still need a release of the consumers' module in order to apply this feature on this module.
Once the release is there, the MR can be edited to add the condition in the
loadByProperties()withingetClientEntity()indeed.Best
Comment #12
bojan_dev commentedI have released 1.23 on the consumers module.
Comment #13
scott falconer commentedComment #14
attilatilman commentedComment #16
attilatilman commentedFilters unpublished consumers from
getClientEntity()by passingstatus => 1toloadByProperties(), so disabled clients are treated as non-existent and cannot obtain tokens. Bumps the minimumdrupal/consumersrequirement to^1.24where thestatusfield already present, and updatescore_version_requirementto^10.3 || ^11to match.Also fixes several pre-existing issues found while working on the branch:
stringtype hints ongetScopeEntityByIdentifier()in both scope repositories 9.x.Oauth2ScopePluginManagerLegacyTest.user_pass_reset_url()deprecated in Drupal 11.4 — the test now usesuser.one_time_authenticationwhen available and falls back for older Drupal versions.Kernel test coverage is added for the unpublished client case across the client credentials and refresh token grant types.
Comment #17
attilatilman commentedComment #18
attilatilman commentedComment #19
scott falconer commentedThanks @attilatilman, tested and it now catches removal of the check and the bearer requests behave as expected.
Comment #20
mglamanI'm happy with the MR! RTBC
Comment #24
bojan_dev commentedGreat work!