-
Notifications
You must be signed in to change notification settings - Fork 310
Description
SMART on FHIR requires adding a launch
parameter when requesting a code for the launch flow. This may not be used by the auth server itself, but rather by a proxy. In my case, I have a proxy that sits between rapidoc and Keycloak, the proxy will read and store the launch parameter and then redirects to the real keycloak authorizationUrl without the launch parameter. After the user logs in to Keycloak, it then redirects to the proxy with the code response. The proxy processes the keycloak response, then the proxy redirects the code and other parameters back to rapidoc.
Currently, rapidoc has no mechanism to customize the authCodeParams. I can try adding the parameter in the authorizationUrl but then it will have to be hardcoded to the OpenAPI document.
RapiDoc/src/templates/security-scheme-template.js
Lines 212 to 227 in 7f53d25
const authCodeParams = new URLSearchParams(authUrlObj.search); | |
const selectedScopes = checkedScopeEls.map((v) => v.value).join(' '); | |
if (selectedScopes) { | |
authCodeParams.set('scope', selectedScopes); | |
} | |
authCodeParams.set('client_id', clientId); | |
authCodeParams.set('redirect_uri', redirectUrlObj.toString()); | |
authCodeParams.set('response_type', responseType); | |
authCodeParams.set('state', state); | |
authCodeParams.set('nonce', nonce); | |
if (pkceCheckboxEl && pkceCheckboxEl.checked) { | |
authCodeParams.set('code_challenge', codeChallenge); | |
authCodeParams.set('code_challenge_method', 'S256'); | |
} | |
authCodeParams.set('show_dialog', true); | |
authUrlObj.search = authCodeParams.toString(); |
