Skip to content

Commit

Permalink
Remove CIBA push auth related classes and configs
Browse files Browse the repository at this point in the history
  • Loading branch information
Akila94 committed Dec 20, 2024
1 parent 605a82a commit ef22366
Show file tree
Hide file tree
Showing 25 changed files with 2 additions and 2,010 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,17 +141,6 @@
</IdentityCache>
</Cache>

<CIBAAuthenticationEndpointWebApp>
{% if open_banking.identity.ciba_webapp.servlet_extension is defined %}
<ServletExtension>
{{open_banking.identity.ciba_webapp.servlet_extension}}
</ServletExtension>
{% else %}
<ServletExtension>
com.wso2.openbanking.accelerator.consent.extensions.ciba.impl.CIBAAuthenticationEndpointDefaultImpl
</ServletExtension>
{% endif %}
</CIBAAuthenticationEndpointWebApp>
<CIBA>
<AuthWebLink>
{% if open_banking.identity.ciba.auth_web_link.redirect_endpoint is defined %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
/**
* CIBA Test Constants class.
*/
@Deprecated
public class CIBAConstants {

public static final String INVALID_REQUEST = "invalid_request";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
/**
* CIBA Signature Algorithm Enforcer class
*/
@Deprecated
public class OBCIBASignatureAlgorithmEnforcementValidator extends SignatureAlgorithmEnforcementValidator {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
/**
* Test class for OBCIBARequestObjectValidationExtension.
*/
@Deprecated
@PowerMockIgnore("jdk.internal.reflect.*")
@PrepareForTest({JWTClaimsSet.class, OAuth2Parameters.class, RequestObject.class, JSONObject.class,
IdentityExtensionsDataHolder.class})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -885,18 +885,6 @@ public String getAuthServletExtension() {
((String) getConfigElementFromKey(OpenBankingConstants.AUTH_SERVLET_EXTENSION)).trim();
}

/**
* Gets the configured CIBA servlet extention implementation.
*
* @deprecated will be removed in the future versions when moving to newer ciba implementation.
* @return
*/
@Deprecated
public String getCibaServletExtension() {
return getConfigElementFromKey(OpenBankingConstants.CIBA_SERVLET_EXTENSION) == null ? "" :
((String) getConfigElementFromKey(OpenBankingConstants.CIBA_SERVLET_EXTENSION)).trim();
}

public String getJWKSConnectionTimeOut() {

return getConfigElementFromKey(OpenBankingConstants.DCR_JWKS_CONNECTION_TIMEOUT) == null ? "3000" :
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,16 +196,6 @@ public void testGetAuthServletExtension() {
Assert.assertEquals(authServletExtension, "sampleServletExtension");
}

@Test (priority = 11)
public void testGetEmptyCibaServletExtension() {

String dummyConfigFile = absolutePathForTestResources + "/open-banking.xml";
String authServletExtension = OpenBankingConfigParser.getInstance(dummyConfigFile)
.getCibaServletExtension();

Assert.assertEquals(authServletExtension, "sampleCIBAServletExtension");
}

@Test (priority = 12)
public void testGetJWKSConnectionTimeout() {

Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import com.wso2.openbanking.accelerator.common.constant.OpenBankingConstants;
import com.wso2.openbanking.accelerator.common.exception.ConsentManagementException;
import com.wso2.openbanking.accelerator.common.util.CarbonUtils;
import com.wso2.openbanking.accelerator.consent.extensions.ciba.authenticator.CIBAPushAuthenticatorConstants;
import com.wso2.openbanking.accelerator.consent.extensions.internal.ConsentExtensionsDataHolder;
import com.wso2.openbanking.accelerator.consent.mgt.dao.models.AuthorizationResource;
import com.wso2.openbanking.accelerator.consent.mgt.service.ConsentCoreService;
Expand All @@ -40,6 +39,7 @@ public class CIBAWebLinkAuthenticatorExtensionImpl implements CIBAWebLinkAuthent
private static final Log log = LogFactory.getLog(CIBAWebLinkAuthenticatorExtensionImpl.class);
private static final ConsentCoreService consentCoreService =
ConsentExtensionsDataHolder.getInstance().getConsentCoreService();
public static final String LOGIN_HINT = "login_hint";

/**
* Method to identify the user/users involved in the authentication.
Expand All @@ -50,7 +50,7 @@ public class CIBAWebLinkAuthenticatorExtensionImpl implements CIBAWebLinkAuthent
@Override
public List<AuthenticatedUser> getAuthenticatedUsers(HttpServletRequest request) {

return Arrays.stream(request.getParameter(CIBAPushAuthenticatorConstants.LOGIN_HINT)
return Arrays.stream(request.getParameter(LOGIN_HINT)
.split(","))
.map(String::trim)
.map(AuthenticatedUser::createLocalAuthenticatedUserFromSubjectIdentifier)
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
package com.wso2.openbanking.accelerator.consent.extensions.internal;

import com.wso2.openbanking.accelerator.common.config.OpenBankingConfigurationService;
import com.wso2.openbanking.accelerator.consent.extensions.ciba.authenticator.CIBAPushAuthenticator;
import com.wso2.openbanking.accelerator.consent.extensions.ciba.authenticator.weblink.CIBAWebLinkAuthenticator;
import com.wso2.openbanking.accelerator.consent.extensions.ciba.authenticator.weblink.notification.CIBAWebLinkNotificationHandler;
import com.wso2.openbanking.accelerator.consent.extensions.common.ConsentExtensionExporter;
Expand Down Expand Up @@ -60,10 +59,7 @@ protected void activate(ComponentContext context) {
if (log.isDebugEnabled()) {
log.debug("Periodical Consent Status Updater Started");
}
CIBAPushAuthenticator authenticator = new CIBAPushAuthenticator();
CIBAWebLinkAuthenticator cibaWebLinkAuthenticator = new CIBAWebLinkAuthenticator();
context.getBundleContext().registerService(ApplicationAuthenticator.class.getName(),
authenticator, null);
context.getBundleContext().registerService(ApplicationAuthenticator.class.getName(),
cibaWebLinkAuthenticator, null);
context.getBundleContext().registerService(AbstractEventHandler.class.getName(),
Expand Down
Loading

0 comments on commit ef22366

Please sign in to comment.