Repository navigation
fix: dynamically resolve consumer registration, oidc token and discovery endpoints in auth docs - #2944
Merged
simonredfern merged 4 commits intoOct 14, 2026
Conversation
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
Fixes issues where authentication documentation rendered on Portal / API Explorer and OpenAPI 3.1 auth schemas contained hardcoded URLs, invalid example endpoints, or placeholders:
Consumer Registration URL & Guide:
OpenAPI31JSONFactory,consumerRegistrationUrlnow points to/consumers/registerwhen Portal URL is available, falling back to${hostname}/consumer-registration.consumerCreationGuideUrl(/developers/consumer-creation) andconsumerRegistrationInstruction, clarifying Step 1 to guide developers to read the registration instructions, log in, and proceed to/consumers/registerto register their application.APIUtil.getServerUrl, fall back topublic_obp_api_urlorhostnamebefore raising an exception whendocumented_server_urlis not set.OIDC Token Endpoint & Discovery Resolution:
oAuth2Descriptionpreviously hardcodedPOST <OIDC_provider_token_endpoint>.oidcTokenEndpointfromoauth2.obp_oidc.hostorpublic_obp_oidc_url(/obp-oidc/token), falling back to<OIDC_provider_token_endpoint>if unconfigured.oidcDiscoveryUrlto guide developers to the instance's OIDC discovery document and theGET /obp/v5.1.0/well-knownendpoint.Sample Endpoint Correction:
directLoginDescription,oAuth2Description, andgatewayLoginDescriptionfromGET /obp/v6.0.0/my/banks(which returns 404) to the validGET /obp/v7.0.0/my/banksendpoint.Tests & CI:
OpenAPI31FactoryTestto extendServerSetupwithFeatureSpecscenarios, covering fallback and dynamic resolution for consumer registration, guide instructions, OIDC token endpoint, discovery document, sample endpoints, and auth descriptions while adhering to test isolation requirements.