From ddc6235422fd6f72d05391146df6f5c0935dd0a9 Mon Sep 17 00:00:00 2001 From: Thisara-Welmilla Date: Thu, 7 Nov 2024 20:29:20 +0530 Subject: [PATCH] Add new authenticator configs for user defined auth extensions. --- .../pom.xml | 4 -- .../model/FederatedAuthenticatorConfig.java | 5 -- ...erDefinedFederatedAuthenticatorConfig.java | 64 ------------------- 3 files changed, 73 deletions(-) delete mode 100644 components/application-mgt/org.wso2.carbon.identity.application.common/src/main/java/org/wso2/carbon/identity/application/common/model/UserDefinedFederatedAuthenticatorConfig.java diff --git a/components/application-mgt/org.wso2.carbon.identity.application.common/pom.xml b/components/application-mgt/org.wso2.carbon.identity.application.common/pom.xml index 73e61d21aa87..81ee3563812e 100644 --- a/components/application-mgt/org.wso2.carbon.identity.application.common/pom.xml +++ b/components/application-mgt/org.wso2.carbon.identity.application.common/pom.xml @@ -61,10 +61,6 @@ org.wso2.carbon.identity.framework org.wso2.carbon.identity.central.log.mgt - - org.wso2.carbon.identity.framework - org.wso2.carbon.identity.action.management - diff --git a/components/application-mgt/org.wso2.carbon.identity.application.common/src/main/java/org/wso2/carbon/identity/application/common/model/FederatedAuthenticatorConfig.java b/components/application-mgt/org.wso2.carbon.identity.application.common/src/main/java/org/wso2/carbon/identity/application/common/model/FederatedAuthenticatorConfig.java index fe35e5aa8626..7805ecfd177f 100644 --- a/components/application-mgt/org.wso2.carbon.identity.application.common/src/main/java/org/wso2/carbon/identity/application/common/model/FederatedAuthenticatorConfig.java +++ b/components/application-mgt/org.wso2.carbon.identity.application.common/src/main/java/org/wso2/carbon/identity/application/common/model/FederatedAuthenticatorConfig.java @@ -67,11 +67,6 @@ public class FederatedAuthenticatorConfig implements Serializable { @XmlElement(name = "DefinedBy") protected DefinedByType definedByType; - public FederatedAuthenticatorConfig() { - - definedByType = DefinedByType.SYSTEM; - } - public static FederatedAuthenticatorConfig build(OMElement federatedAuthenticatorConfigOM) { if (federatedAuthenticatorConfigOM == null) { diff --git a/components/application-mgt/org.wso2.carbon.identity.application.common/src/main/java/org/wso2/carbon/identity/application/common/model/UserDefinedFederatedAuthenticatorConfig.java b/components/application-mgt/org.wso2.carbon.identity.application.common/src/main/java/org/wso2/carbon/identity/application/common/model/UserDefinedFederatedAuthenticatorConfig.java deleted file mode 100644 index 3aaf4f9d80ea..000000000000 --- a/components/application-mgt/org.wso2.carbon.identity.application.common/src/main/java/org/wso2/carbon/identity/application/common/model/UserDefinedFederatedAuthenticatorConfig.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com). - * - * WSO2 LLC. licenses this file to you under the Apache License, - * Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -package org.wso2.carbon.identity.application.common.model; - -import org.wso2.carbon.identity.action.management.model.EndpointConfig; -import org.wso2.carbon.identity.base.AuthenticatorPropertyConstants.AuthenticationType; -import org.wso2.carbon.identity.base.AuthenticatorPropertyConstants.DefinedByType; - -/** - * The user defined federated authenticator configuration model. - */ -public class UserDefinedFederatedAuthenticatorConfig extends FederatedAuthenticatorConfig { - - private static final String TAG_2FA = "2FA"; - private static final String TAG_CUSTOM = "CUSTOM"; - - protected EndpointConfig endpointConfig; - - public UserDefinedFederatedAuthenticatorConfig(AuthenticationType type) { - - definedByType = DefinedByType.USER; - if (AuthenticationType.VERIFICATION == type) { - setTags(new String[]{TAG_CUSTOM, TAG_2FA}); - } else { - setTags(new String[]{TAG_CUSTOM}); - } - } - - /** - * Get the endpoint config of the User defined federated authenticator config. - * - * @return DefinedByType - */ - public EndpointConfig getEndpointConfig() { - - return endpointConfig; - } - - /** - * Set the defined by type of the User defined federated authenticator config. - * - * @param endpointConfig The endpoint config of the User defined federated authenticator config. - */ - public void setEndpointConfig(EndpointConfig endpointConfig) { - - this.endpointConfig = endpointConfig; - } -}