developerzohaib786 commented on PR #136:
URL: https://github.com/apache/polaris-tools/pull/136#issuecomment-3796391163

   ## implementation proof, this actualy fixes Issue #98
   
   ### what Issue #98 asked for
   > "The Token URL should be configurable to integration with 3rd party (like 
Keycloack)."
   > See: https://github.com/jbonofre/polaris-tools/tree/keycloak-support
   
   ### what my previous pull request did wrong
   - only added an environment variable `VITE_OAUTH_TOKEN_URL`
   - still couldn't support keycloak's different authentication flow
   - didn't allow users to choose auth type
   - changed Docker image (unrelated)
   - added whitespace issues
   
   ### what This pull request does right
   
   #### 1. follows reference implementation
   This matches @jbonofre's working implementation in the keycloak-support 
branch that was referenced in issue #98.
   
   #### 2. authentication type selector
   uusers can now choose between:
   - **iInternal (polaris)** - uses `/api/catalog/v1/oauth/tokens`
   - **external (keycloak)** - uses 
`/keycloak/realms/{realm}/protocol/openid-connect/token`
   
   #### 3. dynamic url rrouting
   The code now routes to different 0auth endpoints based on user selection:
   
   ```typescript
   if (authType === "keycloak") {
     if (!realm) {
       throw new Error("Keycloak realm is required for Keycloak authentication")
     }
     tokenUrl = 
   } else {
     tokenUrl = INTERNAL_TOKEN_URL // /api/catalog/v1/oauth/tokens
   }
   
   ## the login form showing the "Authentication Type" dropdown
   <img width="511" height="538" alt="fix-1" 
src="https://github.com/user-attachments/assets/ddb78b3f-5e10-4f9b-a6aa-63e990099a8a";
 />
   
   ## Showing the form fields with "Internal (Polaris)" is selected: Client ID, 
Client Secret, Polaris Realm
   <img width="490" height="538" alt="image" 
src="https://github.com/user-attachments/assets/05d6922a-4ade-4d6a-9af8-1e0765d46904";
 />
   
   ## Notice the new "Keycloak Realm" field appears
   <img width="506" height="602" alt="image" 
src="https://github.com/user-attachments/assets/8266058e-9aca-4fbf-a667-af21920b24fd";
 />
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to