From 7e65b837d17224414bd1ddfcaa3f34404bc75804 Mon Sep 17 00:00:00 2001 From: prabathabey Date: Mon, 21 Dec 2015 22:48:47 +0530 Subject: [PATCH 1/2] Committing logic that stores BST within request metadata --- .../framework/authenticator/BSTAuthenticator.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/authenticator/BSTAuthenticator.java b/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/authenticator/BSTAuthenticator.java index fdd03b8b6f7..db7839966fa 100644 --- a/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/authenticator/BSTAuthenticator.java +++ b/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/authenticator/BSTAuthenticator.java @@ -130,7 +130,7 @@ public class BSTAuthenticator implements WebappAuthenticator { authenticationInfo.setStatus(WebappAuthenticator.Status.CONTINUE); } else { - String bearerToken = request.getContext().findParameter("BST"); + String bearerToken = request.getAttribute("BST").toString(); String resource = requestUri + ":" + requestMethod; @@ -196,7 +196,7 @@ public class BSTAuthenticator implements WebappAuthenticator { if (bstHeader == null || bstHeader.isEmpty()) { return false; } - request.getContext().addParameter("BST", bstHeader); + request.setAttribute("BST", bstHeader); return true; } From 094423e0b9916e9887a7a7a6a3ba79d359cacd94 Mon Sep 17 00:00:00 2001 From: Dilshan Edirisuriya Date: Mon, 21 Dec 2015 23:11:29 +0530 Subject: [PATCH 2/2] Fixing EMM-1129 --- .../impl/DynamicClientRegistrationServiceImpl.java | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/components/identity-extensions/dynamic-client-registration/org.wso2.carbon.dynamic.client.registration/src/main/java/org/wso2/carbon/dynamic/client/registration/impl/DynamicClientRegistrationServiceImpl.java b/components/identity-extensions/dynamic-client-registration/org.wso2.carbon.dynamic.client.registration/src/main/java/org/wso2/carbon/dynamic/client/registration/impl/DynamicClientRegistrationServiceImpl.java index 7938ba355ac..5e361d00775 100644 --- a/components/identity-extensions/dynamic-client-registration/org.wso2.carbon.dynamic.client.registration/src/main/java/org/wso2/carbon/dynamic/client/registration/impl/DynamicClientRegistrationServiceImpl.java +++ b/components/identity-extensions/dynamic-client-registration/org.wso2.carbon.dynamic.client.registration/src/main/java/org/wso2/carbon/dynamic/client/registration/impl/DynamicClientRegistrationServiceImpl.java @@ -123,9 +123,6 @@ public class DynamicClientRegistrationServiceImpl implements DynamicClientRegist String grantType = profile.getGrantType(); String callbackUrl = profile.getCallbackUrl(); boolean isSaaSApp = profile.isSaasApp(); - String audience = profile.getAudience(); - String assertionConsumerURL = profile.getAssertionConsumerURL(); - String recipientValidationURL = profile.getRecepientValidationURL(); if (userId == null || userId.isEmpty()) { return null; @@ -220,13 +217,6 @@ public class DynamicClientRegistrationServiceImpl implements DynamicClientRegist SAMLSSOServiceProviderDTO samlssoServiceProviderDTO = new SAMLSSOServiceProviderDTO(); samlssoServiceProviderDTO.setIssuer(MDM); - samlssoServiceProviderDTO.setAssertionConsumerUrls(new String[] {assertionConsumerURL}); - samlssoServiceProviderDTO.setDoSignResponse(true); - samlssoServiceProviderDTO.setRequestedAudiences(new String[] { audience }); - samlssoServiceProviderDTO.setDefaultAssertionConsumerUrl(assertionConsumerURL); - samlssoServiceProviderDTO.setRequestedRecipients(new String[] {recipientValidationURL}); - samlssoServiceProviderDTO.setDoSignAssertions(true); - SAMLSSOConfigAdmin configAdmin = new SAMLSSOConfigAdmin(getConfigSystemRegistry()); configAdmin.addRelyingPartyServiceProvider(samlssoServiceProviderDTO);