From d33565e3ab114b68efbf795fd6eb8f8ce29fed02 Mon Sep 17 00:00:00 2001 From: thisarawelmilla Date: Mon, 10 Mar 2025 09:01:02 +0530 Subject: [PATCH] Re-purpose Organization in pre-issue access token Request. --- .../PreIssueAccessTokenRequestBuilder.java | 30 ++++++++++++++----- pom.xml | 2 +- 2 files changed, 23 insertions(+), 9 deletions(-) diff --git a/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth/action/execution/PreIssueAccessTokenRequestBuilder.java b/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth/action/execution/PreIssueAccessTokenRequestBuilder.java index 74147676d9..38fe9d74bb 100755 --- a/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth/action/execution/PreIssueAccessTokenRequestBuilder.java +++ b/components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth/action/execution/PreIssueAccessTokenRequestBuilder.java @@ -56,7 +56,9 @@ import org.wso2.carbon.identity.openidconnect.CustomClaimsCallbackHandler; import org.wso2.carbon.identity.openidconnect.OIDCClaimUtil; import org.wso2.carbon.identity.openidconnect.util.ClaimHandlerUtil; +import org.wso2.carbon.identity.organization.management.service.OrganizationManager; import org.wso2.carbon.identity.organization.management.service.exception.OrganizationManagementException; +import org.wso2.carbon.identity.organization.management.service.util.OrganizationManagementUtil; import java.util.ArrayList; import java.util.Arrays; @@ -74,6 +76,8 @@ public class PreIssueAccessTokenRequestBuilder implements ActionExecutionRequest public static final String CLAIMS_PATH_PREFIX = "/accessToken/claims/"; public static final String SCOPES_PATH_PREFIX = "/accessToken/scopes/"; private static final Log LOG = LogFactory.getLog(PreIssueAccessTokenRequestBuilder.class); + private static final OrganizationManager organizationManager = OAuthComponentServiceHolder.getInstance() + .getOrganizationManager(); @Override public ActionType getSupportedActionType() { @@ -112,7 +116,7 @@ private Event getEvent(OAuthTokenReqMessageContext tokenMessageContext, Map[1.1.14, 2.0.0) - 1.1.20 + 1.1.24 [1.0.0, 2.0.0)