Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Login Info Endpoint: optimize OAuth IdPs for JSON Response #3254

Draft
wants to merge 8 commits into
base: develop
Choose a base branch
from

Conversation

adrianhoelzl-sap
Copy link
Contributor

@adrianhoelzl-sap adrianhoelzl-sap commented Jan 22, 2025

(alternative for #3251)

This PR optimizes the login info endpoint so that it does not fetch all OAuth IdPs when a JSON response is requested.

Prior to the optimization, all OAuth IdPs are queried and then used for determining a potential redirect to the corresponding external IdP. However, for JSON responses the redirect is ignored anyway.

The optimization introduces the following changes to the JSON response, which are in our opinion acceptable:

  • showLoginLinks is no longer returned if there is also no SAML IdP with showSamlLink enabled
    • this property is only relevant for the login page and therefore obsolete for the JSON response
    • in the JSON response, only SAML IdPs are part of the idpDefinitions anyway
  • the passcode prompt is no longer removed if there is no SAML/OIDC IdP with showSamlLink/showLinkText in the IdP definitions list
    • password grants with a one-time passcode also work with the UAA user store

The first few commits in this PR are refactorings of the endpoint handler, they don't change any behavior. We advise to go through the PR from commit to commit.

@adrianhoelzl-sap adrianhoelzl-sap force-pushed the login-info-endpoint-optimize-oauth-idps-for-json-response branch from fcc24a6 to e18939e Compare January 23, 2025 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

1 participant