From bc979e3f5eab44f519e746b0ae121b09818a76bb Mon Sep 17 00:00:00 2001 From: Janak Amarasena Date: Fri, 20 Oct 2023 11:34:14 +0530 Subject: [PATCH] Improve authentication service --- .../framework/model/AdditionalData.java | 24 ------------------- .../model/AuthenticatorParamMetadata.java | 20 ++++++++++++---- 2 files changed, 16 insertions(+), 28 deletions(-) diff --git a/components/authentication-framework/org.wso2.carbon.identity.application.authentication.framework/src/main/java/org/wso2/carbon/identity/application/authentication/framework/model/AdditionalData.java b/components/authentication-framework/org.wso2.carbon.identity.application.authentication.framework/src/main/java/org/wso2/carbon/identity/application/authentication/framework/model/AdditionalData.java index c6cf2bf8c738..2dc23a54ffb0 100644 --- a/components/authentication-framework/org.wso2.carbon.identity.application.authentication.framework/src/main/java/org/wso2/carbon/identity/application/authentication/framework/model/AdditionalData.java +++ b/components/authentication-framework/org.wso2.carbon.identity.application.authentication.framework/src/main/java/org/wso2/carbon/identity/application/authentication/framework/model/AdditionalData.java @@ -18,9 +18,7 @@ package org.wso2.carbon.identity.application.authentication.framework.model; -import java.util.ArrayList; import java.util.HashMap; -import java.util.List; import java.util.Map; /** @@ -29,21 +27,9 @@ */ public class AdditionalData { - private List requiredParams = new ArrayList<>(); private String redirectUrl; - private String promptType; private Map additionalAuthenticationParams = new HashMap<>(); - public List getRequiredParams() { - - return requiredParams; - } - - public void setRequiredParams(List requiredParams) { - - this.requiredParams = requiredParams; - } - public String getRedirectUrl() { return redirectUrl; @@ -54,16 +40,6 @@ public void setRedirectUrl(String redirectUrl) { this.redirectUrl = redirectUrl; } - public String getPromptType() { - - return promptType; - } - - public void setPromptType(String promptType) { - - this.promptType = promptType; - } - public Map getAdditionalAuthenticationParams() { return additionalAuthenticationParams; diff --git a/components/authentication-framework/org.wso2.carbon.identity.application.authentication.framework/src/main/java/org/wso2/carbon/identity/application/authentication/framework/model/AuthenticatorParamMetadata.java b/components/authentication-framework/org.wso2.carbon.identity.application.authentication.framework/src/main/java/org/wso2/carbon/identity/application/authentication/framework/model/AuthenticatorParamMetadata.java index 99990896b3de..65ec6cc897b0 100644 --- a/components/authentication-framework/org.wso2.carbon.identity.application.authentication.framework/src/main/java/org/wso2/carbon/identity/application/authentication/framework/model/AuthenticatorParamMetadata.java +++ b/components/authentication-framework/org.wso2.carbon.identity.application.authentication.framework/src/main/java/org/wso2/carbon/identity/application/authentication/framework/model/AuthenticatorParamMetadata.java @@ -26,27 +26,29 @@ public class AuthenticatorParamMetadata { private String name; + private String displayName; private FrameworkConstants.AuthenticatorParamType type; private boolean isConfidential = false; - private boolean isRequired = false; private int paramOrder; private String i18nKey; - public AuthenticatorParamMetadata(String name, FrameworkConstants.AuthenticatorParamType type, int paramOrder) { + public AuthenticatorParamMetadata(String name, String displayName, FrameworkConstants.AuthenticatorParamType type, + int paramOrder, String i18nKey) { this.name = name; + this.displayName = displayName; this.type = type; this.paramOrder = paramOrder; + this.i18nKey = i18nKey; } public AuthenticatorParamMetadata(String name, FrameworkConstants.AuthenticatorParamType type, int paramOrder, - boolean isConfidential, boolean isRequired, String i18nKey) { + boolean isConfidential, String i18nKey) { this.name = name; this.type = type; this.paramOrder = paramOrder; this.isConfidential = isConfidential; - this.isRequired = isRequired; this.i18nKey = i18nKey; } @@ -60,6 +62,16 @@ public void setName(String name) { this.name = name; } + public String getDisplayName() { + + return displayName; + } + + public void setDisplayName(String displayName) { + + this.displayName = displayName; + } + public FrameworkConstants.AuthenticatorParamType getType() { return type;