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

Add Support for "login_hint" for Param in Organization Discovery #45

Merged
merged 4 commits into from
Aug 22, 2024

Conversation

dhaura
Copy link
Contributor

@dhaura dhaura commented Aug 21, 2024

Purpose

  • $Subject
  • When the user email is needed to be sent directly from the SP without prompting organization discovery input capture page, login_hint query paramater can be used along with fidp=OrganizationSSO param if there are b2c login options in the root application.
    • A sample authorize request is as follows.
https://localhost:9443/oauth2/authorize?scope=openid+profile+roles+email&response_type=code&redirect_uri=https://localhost:3000&client_id=<CLIENT_ID>&login_hint=<USER_EMAIL>&fidp=OrganizationSSO
  • Moreover, in future, if this capability is extended to discover the organization of the user based on different user attributes other than email domain, discoveryType query param can be passed in the authorization request to specify the organization discovery type. If discovery type is not specified, email domain based discovery is used as the default type.
    • A sample authorize request is as follows.
https://localhost:9443/oauth2/authorize?scope=openid+profile+roles+email&response_type=code&redirect_uri=https://localhost:3000&client_id=<CLIENT_ID>&login_hint=<USER_EMAIL>&fidp=OrganizationSSO&discoveryType=emailDomain

Goals

  • Facilitate the ability to directly specify the organization discovery type and login hint.

Approach

  • Use login_hint and discoveryType query parameters in autherization request.

Related PRs

Related Issues

Copy link

codecov bot commented Aug 21, 2024

Codecov Report

Attention: Patch coverage is 70.73171% with 12 lines in your changes missing coverage. Please review.

Project coverage is 42.46%. Comparing base (03dc4ba) to head (f18745a).
Report is 8 commits behind head on main.

Files Patch % Lines
.../organization/login/OrganizationAuthenticator.java 70.73% 8 Missing and 4 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main      #45      +/-   ##
============================================
+ Coverage     36.28%   42.46%   +6.17%     
- Complexity       61       77      +16     
============================================
  Files             3        3              
  Lines           463      504      +41     
  Branches         56       65       +9     
============================================
+ Hits            168      214      +46     
+ Misses          264      256       -8     
- Partials         31       34       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jenkins-is-staging
Copy link

PR builder started
Link: https://github.com/wso2/product-is/actions/runs/10495686258

@jenkins-is-staging
Copy link

PR builder completed
Link: https://github.com/wso2/product-is/actions/runs/10495686258
Status: success

Copy link

@jenkins-is-staging jenkins-is-staging left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving the pull request based on the successful pr build https://github.com/wso2/product-is/actions/runs/10495686258

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants