wso2-extensions / identity-carbon-auth-rest

Apache License 2.0
1 stars 144 forks source link

Improve the post authentication handler to set the correct username in the carbon context for organization SSO users #254

Closed sadilchamishka closed 11 months ago

sadilchamishka commented 11 months ago

Proposed changes in this pull request

For the organization SSO users, the authentication valve will set the userID@tenant-domain as the username. Hence the downstream tasks for using the username which set in the carbon context will fail. One way is to manually handle each places. Ex - https://github.com/wso2/identity-organization-management-core/pull/114 when creating organizations/sharing applications, the correct authenticated username was required to fetch.

Also there are number of places for the MyAccount related functions where username in the carbon context is heavily used. Hence resolving each places and fix for any future features based on the username in the carbon context may not be reliable for the organization users. Hence with this PR, set the correct username in the carbon context.

$subject

Related issues

jenkins-is-staging commented 11 months ago

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

jenkins-is-staging commented 11 months ago

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

jenkins-is-staging commented 11 months ago

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

jenkins-is-staging commented 11 months ago

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