Skip to content

Commit

Permalink
Merge pull request #2434 from sadilchamishka/console-callback-url-cac…
Browse files Browse the repository at this point in the history
…he-issue

Set the console callback URL properly before adding to the cache
  • Loading branch information
sadilchamishka committed Apr 23, 2024
2 parents 47ce768 + 57c5b74 commit 0fa51ac
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import org.wso2.carbon.identity.application.authentication.framework.model.AuthenticatedUser;
import org.wso2.carbon.identity.application.common.IdentityApplicationManagementException;
import org.wso2.carbon.identity.application.common.model.User;
import org.wso2.carbon.identity.application.mgt.ApplicationConstants;
import org.wso2.carbon.identity.application.mgt.ApplicationManagementService;
import org.wso2.carbon.identity.base.IdentityException;
import org.wso2.carbon.identity.central.log.mgt.utils.LogConstants;
Expand Down Expand Up @@ -478,6 +479,12 @@ OAuthConsumerAppDTO registerAndRetrieveOAuthApplicationData(OAuthConsumerAppDTO
app.setFapiConformanceEnabled(application.isFapiConformanceEnabled());
}
dao.addOAuthApplication(app);
if (ApplicationConstants.CONSOLE_APPLICATION_NAME.equals(app.getApplicationName())) {
String consoleCallBackURL = OAuth2Util.getConsoleCallbackFromServerConfig(tenantDomain);
if (StringUtils.isNotEmpty(consoleCallBackURL)) {
app.setCallbackUrl(consoleCallBackURL);
}
}
AppInfoCache.getInstance().addToCache(app.getOauthConsumerKey(), app, tenantDomain);
if (LOG.isDebugEnabled()) {
LOG.debug("Oauth Application registration success : " + application.getApplicationName() +
Expand Down

0 comments on commit 0fa51ac

Please sign in to comment.